public class NumberedLineWriter extends IndentedLineWriter
| Modifier and Type | Field and Description |
|---|---|
static PrintWriter |
OUT
A default numbered line writer to the standard output stream.
|
out| Constructor and Description |
|---|
NumberedLineWriter(Writer out)
Constructs a stream which will write line number in front of each line.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
beginNewLine()
Invoked when a new line is begining.
|
int |
getLineNumber()
Returns the current line number.
|
void |
setLineNumber(int line)
Sets the current line number.
|
getIdentation, setIndentation, write, write, writeclose, flushpublic static final PrintWriter OUT
FilterWriter.close() method on this stream will only flush it without closing it.public NumberedLineWriter(Writer out)
out - The underlying stream to write to.public int getLineNumber()
public void setLineNumber(int line)
line - The current line number.protected void beginNewLine()
throws IOException
beginNewLine in class IndentedLineWriterIOException - If an I/O error occursCopyright © 1996–2019 Geotools. All rights reserved.