okapi.tools
Class ToolOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by javax.servlet.ServletOutputStream
          extended by okapi.tools.ToolOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class ToolOutputStream
extends javax.servlet.ServletOutputStream

Class ToolOutputStream. ServletOutputStream which captures output into byte array output stream.

Version:
$Revision: 863 $, $Date: 2006-05-07 17:24:27 -0400 (Sun, 07 May 2006) $
Author:
MIT Stellar team

Constructor Summary
ToolOutputStream()
           
 
Method Summary
 void close()
          Method close.
 void flush()
          Method flush.
 byte[] toByteArray()
           
 java.lang.String toString()
          Method toString.
 void write(byte[] b)
          Method write.
 void write(byte[] b, int off, int len)
          Method write.
 void write(int b)
          Method write.
 
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, wait, wait, wait
 

Constructor Detail

ToolOutputStream

public ToolOutputStream()
Method Detail

write

public void write(int b)
           throws java.io.IOException
Method write.

Specified by:
write in class java.io.OutputStream
Parameters:
b -
Throws:
java.io.IOException
See Also:
OutputStream.write(int)

close

public void close()
           throws java.io.IOException
Method close.

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
Method flush.

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

write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
Method write.

Overrides:
write in class java.io.OutputStream
Parameters:
b -
off -
len -
Throws:
java.io.IOException

write

public void write(byte[] b)
           throws java.io.IOException
Method write.

Overrides:
write in class java.io.OutputStream
Parameters:
b -
Throws:
java.io.IOException

toString

public java.lang.String toString()
Method toString.

Overrides:
toString in class java.lang.Object
Returns:
String

toByteArray

public byte[] toByteArray()


Copyright ? 2001-2009 MIT. All Rights Reserved.