Package org.apache.commons.io.output
Class TeeWriter
- java.lang.Object
-
- java.io.Writer
-
- org.apache.commons.io.output.FilterCollectionWriter
-
- org.apache.commons.io.output.ProxyCollectionWriter
-
- org.apache.commons.io.output.TeeWriter
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.Appendable
,java.lang.AutoCloseable
public class TeeWriter extends ProxyCollectionWriter
Classic splitter ofWriter
. Named after the Unix 'tee' command. It allows a stream to be branched off so there are now two streams.This currently a only convenience class with the proper name "TeeWriter".
- Since:
- 2.7
-
-
Constructor Detail
-
TeeWriter
public TeeWriter(java.util.Collection<java.io.Writer> writers)
Creates a new filtered collection writer.- Parameters:
writers
- Writers to provide the underlying targets.
-
TeeWriter
public TeeWriter(java.io.Writer... writers)
Creates a new filtered collection writer.- Parameters:
writers
- Writers to provide the underlying targets.
-
-