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:
    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".

- - ### Field Summary

    - ### Fields inherited from class org.apache.commons.io.output.FilterCollectionWriter

      `EMPTY_WRITERS, writers`

    - ### Fields inherited from class java.io.Writer

      `lock`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TeeWriter(Collection<Writer> writers)` Constructs a new filtered collection writer.
    `TeeWriter(Writer... writers)` Constructs a new filtered collection writer.

  - ### Method Summary

    - ### Methods inherited from class org.apache.commons.io.output.ProxyCollectionWriter

      `afterWrite, append, append, append, beforeWrite, close, flush, handleIOException, write, write, write, write, write`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### 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.