planetj.servlet.wrapper
Class PrintWriterBuffer

java.lang.Object
  |
  +--java.io.Writer
        |
        +--java.io.PrintWriter
              |
              +--planetj.servlet.wrapper.PrintWriterBuffer
All Implemented Interfaces:
Buffer

public class PrintWriterBuffer
extends PrintWriter
implements Buffer


Constructor Summary
PrintWriterBuffer()
           
 
Method Summary
 void close()
           
 Reader getAsReader()
          Produces a reader of the buffered data.
 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()
Overrides:
close in class PrintWriter

getAsReader

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

Specified by:
getAsReader in interface Buffer
UnsupportedEncodingException

getAsString

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

Specified by:
getAsString in interface Buffer
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.