Outputpublic class Output extends Object An {@link Output} objects is an helper to write to a character stream {@link Writer}.
It provide some helper methods to the various "sourcer" classes from this package
to help them write to the underlying stream. |
Fields Summary |
---|
private final Writer | mWriter |
Constructors Summary |
---|
public Output(Writer writer)Creates a new {@link Output} object that wraps the given {@link Writer}.
The caller is responsible of opening and closing the {@link Writer}.
mWriter = writer;
|
Methods Summary |
---|
public void | write(java.lang.String format, java.lang.Object args)Writes a formatted string to the writer.
try {
mWriter.write(String.format(format, args));
} catch (IOException e) {
throw new RuntimeException(e);
}
| public void | write(char c)Writes a single character to the writer.
write(Character.toString(c));
| public void | write(java.lang.StringBuilder sb)Writes a {@link StringBuilder} to the writer.
write(sb.toString());
|
|