Class FilterCollectionWriter

java.lang.Object
java.io.Writer
org.apache.commons.io.output.FilterCollectionWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable
Direct Known Subclasses:
ProxyCollectionWriter

public class FilterCollectionWriter extends Writer
Abstract class for writing filtered character streams to a Collection of writers. This is in contrast to FilterWriter which is backed by a single Writer.

This abstract class provides default methods that pass all requests to the contained writers. Subclasses should likely override some of these methods.

The class Writer defines method signatures with throws IOException, which in this class are actually IOExceptionList containing a list of IOIndexedException.

Since:
2.7
  • Field Details

    • EMPTY_WRITERS

      protected final Collection<Writer> EMPTY_WRITERS
      Empty and immutable collection of writers.
    • writers

      protected final Collection<Writer> writers
      The underlying writers.
  • Constructor Details

    • FilterCollectionWriter

      protected FilterCollectionWriter(Collection<Writer> writers)
      Creates a new filtered collection writer.
      Parameters:
      writers - Writers to provide the underlying targets.
    • FilterCollectionWriter

      protected FilterCollectionWriter(Writer... writers)
      Creates a new filtered collection writer.
      Parameters:
      writers - Writers to provide the underlying targets.
  • Method Details