org.tuckey.web.filters.validation
Class ServletStreamCollector

java.lang.Object
  extended by java.io.OutputStream
      extended by javax.servlet.ServletOutputStream
          extended by org.tuckey.web.filters.validation.ServletStreamCollector
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class ServletStreamCollector
extends javax.servlet.ServletOutputStream

Wraps ServletOutputStream so that we can collect the output into a string.

Version:
$Revision: 1 $ $Date: 2006-07-12 08:07:49 +1200 (Wed, 12 Jul 2006) $
Author:
Paul Tuckey

Constructor Summary
protected ServletStreamCollector(ResponseCollector rc)
           
 
Method Summary
 byte[] getBytes()
           
 java.lang.String toString()
           
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
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
close, flush
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServletStreamCollector

protected ServletStreamCollector(ResponseCollector rc)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

write

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

write

public void write(byte[] b)
           throws java.io.IOException
Overrides:
write in class java.io.OutputStream
Throws:
java.io.IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
Overrides:
write in class java.io.OutputStream
Throws:
java.io.IOException

getBytes

public byte[] getBytes()