Save This Page
Home » oscache-2.4.1-full » com.opensymphony.oscache » web » filter » [javadoc | source]
com.opensymphony.oscache.web.filter
public class: SplitServletOutputStream [javadoc | source]
java.lang.Object
   java.io.OutputStream
      javax.servlet.ServletOutputStream
         com.opensymphony.oscache.web.filter.SplitServletOutputStream

All Implemented Interfaces:
    Closeable, Flushable

Extends the base ServletOutputStream class so that the stream can be captured as it gets written. This is achieved by overriding the write() methods and outputting the data to two streams - the original stream and a secondary stream that is designed to capture the written data.
Field Summary
 OutputStream captureStream     
 OutputStream passThroughStream     
Constructor:
 public SplitServletOutputStream(OutputStream captureStream,
    OutputStream passThroughStream) 
    Constructs a split output stream that both captures and passes through the servlet response.
    Parameters:
    captureStream - The stream that will be used to capture the data.
    passThroughStream - The pass-through ServletOutputStream that will write the response to the client as originally intended.
Method from com.opensymphony.oscache.web.filter.SplitServletOutputStream Summary:
close,   flush,   write,   write,   write
Methods from javax.servlet.ServletOutputStream:
print,   print,   print,   print,   print,   print,   print,   println,   println,   println,   println,   println,   println,   println,   println
Methods from java.io.OutputStream:
close,   flush,   write,   write,   write
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.opensymphony.oscache.web.filter.SplitServletOutputStream Detail:
 public  void close() throws IOException 
    Closes both the output streams.
 public  void flush() throws IOException 
    Flushes both the output streams.
 public  void write(int value) throws IOException 
    Writes the incoming data to both the output streams.
 public  void write(byte[] value) throws IOException 
    Writes the incoming data to both the output streams.
 public  void write(byte[] b,
    int off,
    int len) throws IOException 
    Writes the incoming data to both the output streams.