planetj.servlet.wrapper
Class PrintWriterBuffer

java.lang.Object
  extended byjava.io.Writer
      extended byjava.io.PrintWriter
          extended byplanetj.servlet.wrapper.PrintWriterBuffer
All Implemented Interfaces:
Buffer
Direct Known Subclasses:
PleaseWaitPrintWriterBuffer

public class PrintWriterBuffer
extends java.io.PrintWriter
implements Buffer


Constructor Summary
PrintWriterBuffer()
           
 
Method Summary
 void close()
           
 java.io.Reader getAsReader()
          Produces a reader of the buffered data.
 java.lang.String getAsString()
          Produces the buffered data in string form.
 boolean prefersReader()
          It's more efficient to simply go directly to String.
 int size()
           
 
Methods inherited from class java.io.PrintWriter
checkError, flush, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, println, println, write, write, write, write, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrintWriterBuffer

public PrintWriterBuffer()
Method Detail

close

public void close()

getAsReader

public java.io.Reader getAsReader()
                           throws java.io.UnsupportedEncodingException
Description copied from interface: Buffer
Produces a reader of the buffered data.

Specified by:
getAsReader in interface Buffer
Throws:
java.io.UnsupportedEncodingException

getAsString

public java.lang.String getAsString()
                             throws java.io.UnsupportedEncodingException
Description copied from interface: Buffer
Produces the buffered data in string form.

Specified by:
getAsString in interface Buffer
Throws:
java.io.UnsupportedEncodingException

prefersReader

public boolean prefersReader()
It's more efficient to simply go directly to String.

Specified by:
prefersReader in interface Buffer

size

public int size()
Specified by:
size in interface Buffer
Returns:
the number of bytes or characters in the buffer.