Package org.apache.commons.io.output
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
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 SummaryFieldsModifier and TypeFieldDescriptionprotected final Collection<Writer> Empty and immutable collection of writers.protected final Collection<Writer> The underlying writers.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedFilterCollectionWriter(Writer... writers) Constructs a new filtered collection writer.protectedFilterCollectionWriter(Collection<Writer> writers) Constructs a new filtered collection writer.
- 
Method SummaryModifier and TypeMethodDescriptionappend(char c) append(CharSequence csq) append(CharSequence csq, int start, int end) voidclose()voidflush()Flushes the stream.voidwrite(char[] cbuf) voidwrite(char[] cbuf, int off, int len) Writes a portion of an array of characters.voidwrite(int c) Writes a single character.voidvoidWrites a portion of a string.
- 
Field Details- 
EMPTY_WRITERSEmpty and immutable collection of writers.
- 
writersThe underlying writers.
 
- 
- 
Constructor Details- 
FilterCollectionWriterConstructs a new filtered collection writer.- Parameters:
- writers- Writers to provide the underlying targets.
 
- 
FilterCollectionWriterConstructs a new filtered collection writer.- Parameters:
- writers- Writers to provide the underlying targets.
 
 
- 
- 
Method Details- 
append- Specified by:
- appendin interface- Appendable
- Overrides:
- appendin class- Writer
- Throws:
- IOException
 
- 
append- Specified by:
- appendin interface- Appendable
- Overrides:
- appendin class- Writer
- Throws:
- IOException
 
- 
append- Specified by:
- appendin interface- Appendable
- Overrides:
- appendin class- Writer
- Throws:
- IOException
 
- 
close- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Specified by:
- closein class- Writer
- Throws:
- IOException
 
- 
flushFlushes the stream.- Specified by:
- flushin interface- Flushable
- Specified by:
- flushin class- Writer
- Throws:
- IOException- If an I/O error occurs
 
- 
write- Overrides:
- writein class- Writer
- Throws:
- IOException
 
- 
writeWrites a portion of an array of characters.- Specified by:
- writein class- Writer
- Parameters:
- cbuf- Buffer of characters to be written
- off- Offset from which to start reading characters
- len- Number of characters to be written
- Throws:
- IOException- If an I/O error occurs
 
- 
writeWrites a single character.- Overrides:
- writein class- Writer
- Throws:
- IOException- If an I/O error occurs
 
- 
write- Overrides:
- writein class- Writer
- Throws:
- IOException
 
- 
writeWrites a portion of a string.- Overrides:
- writein class- Writer
- Parameters:
- str- String to be written
- off- Offset from which to start reading characters
- len- Number of characters to be written
- Throws:
- IOException- If an I/O error occurs
 
 
-