Class TeeWriter

All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable

public class TeeWriter extends ProxyCollectionWriter
Classic splitter of Writer. 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 Details

    • TeeWriter

      public TeeWriter(Collection<Writer> writers)
      Constructs a new filtered collection writer.
      Parameters:
      writers - Writers to provide the underlying targets.
    • TeeWriter

      public TeeWriter(Writer... writers)
      Constructs a new filtered collection writer.
      Parameters:
      writers - Writers to provide the underlying targets.