org.ibisph.filter.artifact
Class ResponseStream

java.lang.Object
  extended by java.io.OutputStream
      extended by javax.servlet.ServletOutputStream
          extended by org.ibisph.filter.artifact.ResponseStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class ResponseStream
extends javax.servlet.ServletOutputStream

Standard response stream required for the artifacting filter mechanism.

Author:
JSP Book (www.jspbook.com)

Field Summary
protected  java.io.OutputStream outputStream
           
protected  javax.servlet.ServletOutputStream servletOutputStream
           
 
Constructor Summary
ResponseStream(java.io.OutputStream outputStream)
          Core of the response stream.
 
Method Summary
 void close()
          Closes the output stream
 void flush()
          Flushes the output stream
 void write(byte[] b)
          Standard write method that is used by downstream response processing.
 void write(byte[] b, int off, int len)
          Standard write method that is used by downstream response processing.
 void write(int b)
          Standard write method that is used by downstream response processing.
 
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.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

servletOutputStream

protected javax.servlet.ServletOutputStream servletOutputStream

outputStream

protected java.io.OutputStream outputStream
Constructor Detail

ResponseStream

public ResponseStream(java.io.OutputStream outputStream)
Core of the response stream. This class basically needs a new output stream to capture the artifact to.

Parameters:
outputStream - New output stream that is to be used to capture the response.
Method Detail

close

public void close()
           throws java.io.IOException
Closes the output stream

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.OutputStream
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Flushes the output stream

Specified by:
flush in interface java.io.Flushable
Overrides:
flush in class java.io.OutputStream
Throws:
java.io.IOException

write

public void write(int b)
           throws java.io.IOException
Standard write method that is used by downstream response processing.

Specified by:
write in class java.io.OutputStream
Parameters:
b - Byte of data to be written to the new captured output stream.
Throws:
java.io.IOException

write

public void write(byte[] b)
           throws java.io.IOException
Standard write method that is used by downstream response processing.

Overrides:
write in class java.io.OutputStream
Parameters:
b - Array of bytes to be written to the new captured output stream.
Throws:
java.io.IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
Standard write method that is used by downstream response processing.

Overrides:
write in class java.io.OutputStream
Parameters:
b - Array of bytes to be written to the new captured output stream.
off - Offset of where to write the bytes to the new captured output stream.
len - Number of bytes to the new captured output stream.
Throws:
java.io.IOException