jodd.servlet.filter
Class ByteArrayOutputStreamWrapper

java.lang.Object
  extended by java.io.OutputStream
      extended by javax.servlet.ServletOutputStream
          extended by jodd.servlet.filter.ByteArrayOutputStreamWrapper
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class ByteArrayOutputStreamWrapper
extends javax.servlet.ServletOutputStream

Implementation of ServletOutputStream that allows the filter to hold the Response content for insertion into the cache.


Field Summary
protected  FastByteArrayOutputStream baStream
           
protected  boolean finallized
           
protected  boolean flushOnFinalizeOnly
           
protected  java.io.OutputStream intStream
           
 
Constructor Summary
ByteArrayOutputStreamWrapper()
           
ByteArrayOutputStreamWrapper(java.io.OutputStream outStream)
           
 
Method Summary
 void clear()
           
 void close()
           
 void flush()
           
 FastByteArrayOutputStream getByteArrayStream()
           
 boolean isFinallized()
           
protected  void processStream()
           
 void reset()
           
 void setFinallized()
           
 void write(int i)
           
 
Methods inherited from class javax.servlet.ServletOutputStream
print, print, print, print, print, print, print, println, println, println, println, println, println, println, println
 
Methods inherited from class java.io.OutputStream
write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

intStream

protected java.io.OutputStream intStream

baStream

protected FastByteArrayOutputStream baStream

finallized

protected boolean finallized

flushOnFinalizeOnly

protected boolean flushOnFinalizeOnly
Constructor Detail

ByteArrayOutputStreamWrapper

public ByteArrayOutputStreamWrapper(java.io.OutputStream outStream)

ByteArrayOutputStreamWrapper

public ByteArrayOutputStreamWrapper()
Method Detail

getByteArrayStream

public FastByteArrayOutputStream getByteArrayStream()

setFinallized

public void setFinallized()

isFinallized

public boolean isFinallized()

write

public void write(int i)
           throws java.io.IOException
Specified by:
write in class java.io.OutputStream
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.OutputStream
Throws:
java.io.IOException

reset

public void reset()

flush

public void flush()
           throws java.io.IOException
Specified by:
flush in interface java.io.Flushable
Overrides:
flush in class java.io.OutputStream
Throws:
java.io.IOException

processStream

protected void processStream()
                      throws java.io.IOException
Throws:
java.io.IOException

clear

public void clear()


Copyright ©2008 Jodd Team