public class WriterOutput extends Object implements Output
Writer.| Modifier | Constructor and Description |
|---|---|
|
WriterOutput(Writer writer) |
protected |
WriterOutput(Writer writer,
boolean closeWriterOnFinish) |
| Modifier and Type | Method and Description |
|---|---|
void |
finish()
Indicates that all output has been written.
|
protected Writer |
getWriter()
Returns the underlying writer that was passed to the constructor.
|
boolean |
processLine(Line line)
Writes a line to the output.
|
protected boolean |
writeLastLineEnding()
Returns true if the last line ending should be written.
|
public WriterOutput(Writer writer)
protected WriterOutput(Writer writer, boolean closeWriterOnFinish)
protected Writer getWriter()
public boolean processLine(Line line)
OutputprocessLine in interface OutputprocessLine in interface LineProcessorline - the line to write to the output.Output device is ready to process more
lines, and false otherwise; output devices usually return truepublic void finish()
Outputfinish in interface Outputfinish in interface LineProcessorprotected boolean writeLastLineEnding()
This default implementation always returns true, but certain subclasses
such as StringOutput sometimes return false when the last line
should not be terminated with a line ending.
Copyright © 2025. All rights reserved.