Package com.softsynth.jmsl.util
Class EchoingByteArrayOutputStream
java.lang.Object
java.io.OutputStream
com.softsynth.jmsl.util.EchoingByteArrayOutputStream
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.AutoCloseable
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, nick@didkovsky.com
-
Constructor Summary
Constructors Constructor Description EchoingByteArrayOutputStream()
-
Method Summary
Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream, write, write
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
EchoingByteArrayOutputStream
public EchoingByteArrayOutputStream()
-
-
Method Details
-
write
public void write(int b)- Specified by:
write
in classjava.io.OutputStream
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-