? FilterCollectionWriter
java.lang.Object
java.io.Writer
org.apache.commons.io.output.FilterCollectionWriter
- ????????:
Closeable
,Flushable
,Appendable
,AutoCloseable
- ??????:
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
.
- ???????:
- 2.7
-
????
????????????protected final Collection<Writer>
Empty and immutable collection of writers.protected final Collection<Writer>
The underlying writers. -
?????
???????????protected
FilterCollectionWriter
(Writer... writers) Creates a new filtered collection writer.protected
FilterCollectionWriter
(Collection<Writer> writers) Creates a new filtered collection writer. -
????
??????????append
(char c) append
(CharSequence csq) append
(CharSequence csq, int start, int end) void
close()
void
flush()
Flushes the stream.void
write
(char[] cbuf) void
write
(char[] cbuf, int off, int len) Writes a portion of an array of characters.void
write
(int c) Writes a single character.void
void
Writes a portion of a string.??????? java.io.Writer
nullWriter
-
??????
-
EMPTY_WRITERS
Empty and immutable collection of writers. -
writers
The underlying writers.
-
-
???????
-
FilterCollectionWriter
Creates a new filtered collection writer.- ??:
writers
- Writers to provide the underlying targets.
-
FilterCollectionWriter
Creates a new filtered collection writer.- ??:
writers
- Writers to provide the underlying targets.
-
-
??????
-
append
- ???:
append
????Appendable
- ??:
append
???Writer
- ??:
IOException
-
append
- ???:
append
????Appendable
- ??:
append
???Writer
- ??:
IOException
-
append
- ???:
append
????Appendable
- ??:
append
???Writer
- ??:
IOException
-
close
- ???:
close
????AutoCloseable
- ???:
close
????Closeable
- ???:
close
???Writer
- ??:
IOException
-
flush
Flushes the stream.- ???:
flush
????Flushable
- ???:
flush
???Writer
- ??:
IOException
- If an I/O error occurs
-
write
- ??:
write
???Writer
- ??:
IOException
-
write
Writes a portion of an array of characters.- ???:
write
???Writer
- ??:
cbuf
- Buffer of characters to be writtenoff
- Offset from which to start reading characterslen
- Number of characters to be written- ??:
IOException
- If an I/O error occurs
-
write
Writes a single character.- ??:
write
???Writer
- ??:
IOException
- If an I/O error occurs
-
write
- ??:
write
???Writer
- ??:
IOException
-
write
Writes a portion of a string.- ??:
write
???Writer
- ??:
str
- String to be writtenoff
- Offset from which to start reading characterslen
- Number of characters to be written- ??:
IOException
- If an I/O error occurs
-