jrun.servlet.io
Class ReusableBufferedOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.FilterOutputStream
              |
              +--java.io.BufferedOutputStream
                    |
                    +--jrun.servlet.io.ReusableBufferedOutputStream

public final class ReusableBufferedOutputStream
extends java.io.BufferedOutputStream

this class implements a reusable buffered stream by exposing the ability to swap out the underlying stream. When this happens, we reset everything.


Fields inherited from class java.io.BufferedOutputStream
buf, count
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
ReusableBufferedOutputStream(java.io.OutputStream out, int size)
           
 
Method Summary
 int getBufferSize()
           
 void print(java.lang.String s)
          fast print method that assumes ASCII characters.
 void println(java.lang.String s)
           
 void resetBuffer()
           
 void setBufferSize(int size)
           
 void setOutputStream(java.io.OutputStream out)
          install the new output stream, and clear the buffer.
 
Methods inherited from class java.io.BufferedOutputStream
flush, write, write
 
Methods inherited from class java.io.FilterOutputStream
close, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReusableBufferedOutputStream

public ReusableBufferedOutputStream(java.io.OutputStream out,
                                    int size)
Method Detail

setOutputStream

public void setOutputStream(java.io.OutputStream out)
install the new output stream, and clear the buffer.

print

public void print(java.lang.String s)
           throws java.io.IOException
fast print method that assumes ASCII characters.

println

public final void println(java.lang.String s)
                   throws java.io.IOException

resetBuffer

public void resetBuffer()

setBufferSize

public void setBufferSize(int size)

getBufferSize

public int getBufferSize()


Copyright � 2002 Macromedia Corporation. All Rights Reserved.