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
-
Constructor Summary
-
Method Summary
Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream, write, write
-
Field Details
-
baos
-
-
Constructor Details
-
TeeOutputStream
-
-
Method Details
-
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
toString
-
toByteArray
public byte[] toByteArray()
-