| java.lang.Object java.io.Writer javolution.io.AppendableWriter
AppendableWriter | final public class AppendableWriter extends Writer implements Reusable(Code) | | This class allows any Appendable to be used as
a writer.
author: Jean-Marie Dautelle version: 3.8, May 8, 2006 |
Constructor Summary | |
public | AppendableWriter() Creates a new appendable writer for which the appendable output
is not set. |
Method Summary | |
public void | close() Closes and
AppendableWriter.reset resets this writer for reuse. | public void | flush() Flushes the stream. | public void | reset() | public AppendableWriter | setOutput(Appendable output) Sets the appendable output being written to.
For example:[code]
Writer writer = new AppendableWriter().setOutput(new TextBuilder());
[/code]
Parameters: output - the appendable written to. | public void | write(char c) Writes a single character. | public void | write(int c) Writes the 16 low-order bits of the given integer value;
the 16 high-order bits are ignored. | public void | write(char cbuf, int off, int len) Writes a portion of an array of characters. | public void | write(String str, int off, int len) Writes a portion of a string. | public void | write(CharSequence csq) Writes the specified character sequence. |
flush | public void flush()(Code) | | Flushes the stream.
|
reset | public void reset()(Code) | | |
write | public void write(char c) throws IOException(Code) | | Writes a single character.
Parameters: c - char the character to be written. throws: IOException - if an I/O error occurs. |
write | public void write(int c) throws IOException(Code) | | Writes the 16 low-order bits of the given integer value;
the 16 high-order bits are ignored.
Parameters: c - the value of the character to be written. throws: IOException - if an I/O error occurs. |
write | public void write(char cbuf, int off, int len) throws IOException(Code) | | Writes a portion of an array of characters.
Parameters: cbuf - the array of characters. Parameters: off - the offset from which to start writing characters. Parameters: len - the number of characters to write. throws: IOException - if an I/O error occurs. |
write | public void write(String str, int off, int len) throws IOException(Code) | | Writes a portion of a string.
Parameters: str - a String. Parameters: off - the offset from which to start writing characters. Parameters: len - the number of characters to write. throws: IOException - if an I/O error occurs |
|
|