Class ProxyCollectionWriter

  • All Implemented Interfaces:
    Closeable, Flushable, Appendable, AutoCloseable
    Direct Known Subclasses:
    TeeWriter

    public class ProxyCollectionWriter
    extends FilterCollectionWriter
    A Proxy stream collection which acts as expected, that is it passes the method calls on to the proxied streams and doesn't change which methods are being called. It is an alternative base class to FilterWriter and FilterCollectionWriter to increase reusability, because FilterWriter changes the methods being called, such as write(char[]) to write(char[], int, int) and write(String) to write(String, int, int). This is in contrast to ProxyWriter which is backed by a single Writer.
    Since:
    2.7
    • Constructor Detail

      • ProxyCollectionWriter

        public ProxyCollectionWriter​(Collection<Writer> writers)
        Creates a new proxy collection writer.
        Parameters:
        writers - Writers object to provide the underlying targets.
      • ProxyCollectionWriter

        public ProxyCollectionWriter​(Writer... writers)
        Creates a new proxy collection writer.
        Parameters:
        writers - Writers to provide the underlying targets.