| Modifier and Type | Field and Description |
|---|---|
static Writer |
DISCARD
A writer that ignores any data written to it.
|
| Modifier and Type | Method and Description |
|---|---|
static Writer |
autoFlushing(Writer out) |
static Writer |
fromAppendable(Appendable delegate)
Wraps an
Appendable as a Writer (if necessary). |
static Writer |
onFirstChar(Writer out,
Runnable runnable) |
static Writer |
tee(Writer... delegates)
Creates and returns a
Writer that delegates all work to the given delegates:
The write() methods write the given data to all the delegates;
if any of these throw an IOException, it is rethrown, and it is undefined whether all the data was
written to all the delegates. |
static Writer |
trackLineAndColumn(Writer out,
LineUtil.LineAndColumnTracker tracker) |
public static final Writer DISCARD
public static Writer fromAppendable(Appendable delegate)
Appendable as a Writer (if necessary).public static Writer onFirstChar(Writer out, Runnable runnable)
FilterWriter that runs the runnable right before the first character is writtenpublic static Writer trackLineAndColumn(Writer out, LineUtil.LineAndColumnTracker tracker)
FilterWriter that tracks line and column numbers while characters are writtenLineUtil.lineAndColumnTracker()public static Writer tee(Writer... delegates)
Writer that delegates all work to the given delegates:
write() methods write the given data to all the delegates;
if any of these throw an IOException, it is rethrown, and it is undefined whether all the data was
written to all the delegates.
flush() flushes the delegates; throws the first IOException that any
of the delegates throws.
close() attempts to close all the delegates; if any of these
throw IOExceptions, one of them is rethrown.
Copyright © 2022 Arno Unkrig. All rights reserved.