FilterWriter
itself
provides default methods that pass all requests to the
contained stream. Subclasses of FilterWriter
should override some of these methods and may also
provide additional methods and fields.
Modifier and Type | Field and Description |
---|---|
protected Writer | out
The underlying character-output stream. |
Access | Constructor and Description |
---|---|
protected | FilterWriter(Writer
a Writer object to provide the underlying stream. out)Create a new filtered writer. |
Modifier and Type | Method and Description |
---|---|
public void | close()
Implements abstract java. Implements java. Closes the stream, flushing it first. |
public void | flush()
Implements abstract java. Implements java. Flushes the stream. |
public void | write(int
int specifying a character to be written c)Overrides java. Writes a single character. |
public void | write(char[]
Buffer of characters to be written cbuf, int Offset from which to start reading characters off, int Number of characters to be written len)Implements abstract java. Writes a portion of an array of characters. |
public void | write(String
String to be written str, int Offset from which to start reading characters off, int Number of characters to be written len)Overrides java. Writes a portion of a string. |
out | back to summary |
---|---|
protected Writer out The underlying character-output stream. |
FilterWriter | back to summary |
---|---|
protected FilterWriter(Writer out) Create a new filtered writer.
|
close | back to summary |
---|---|
public void close() throws IOException Implements abstract java. Implements java. Doc from java. Closes the stream, flushing it first. Once the stream has been closed, further write() or flush() invocations will cause an IOException to be thrown. Closing a previously closed stream has no effect.
|
flush | back to summary |
---|---|
public void flush() throws IOException Implements abstract java. Implements java. Flushes the stream.
|
write | back to summary |
---|---|
public void write(int c) throws IOException Overrides java. Writes a single character.
|
write | back to summary |
---|---|
public void write(char[] cbuf, int off, int len) throws IOException Implements abstract java. Writes a portion of an array of characters.
|
write | back to summary |
---|---|
public void write(String str, int off, int len) throws IOException Overrides java. Writes a portion of a string.
|