com.softsynth.jmsl.util
Class EchoingByteArrayOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by com.softsynth.jmsl.util.EchoingByteArrayOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class EchoingByteArrayOutputStream
extends java.io.OutputStream

An output stream which contains a ByteArrayOutputStream. A PrintWriter initialized with this output stream will echo to System.out as well as write text to a ByteArrayOutputStream. Call toString() to dump contents of everything written to this stream.

Author:
Nick Didkovsky, didkovn@mail.rockefeller.edu

Constructor Summary
EchoingByteArrayOutputStream()
           
 
Method Summary
 java.lang.String toString()
           
 void write(int b)
           
 
Methods inherited from class java.io.OutputStream
close, flush, write, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EchoingByteArrayOutputStream

public EchoingByteArrayOutputStream()
Method Detail

write

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

toString

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