Package ch.qos.logback.core.testUtil
Class TeeOutputStream
java.lang.Object
java.io.OutputStream
ch.qos.logback.core.testUtil.TeeOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
This stream writes its output to the target PrintStream supplied to its
constructor. At the same time, all the available bytes are collected and
returned by the toString() method.
- Author:
- Ceki Gulcu
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.OutputStream
close, flush, write, write
-
Field Details
-
baos
-
-
Constructor Details
-
TeeOutputStream
-
-
Method Details
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
toString
-
toByteArray
public byte[] toByteArray()
-