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, write
close, flush
public 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 IndentedLineWriter
IOException
- If an I/O error occursCopyright © 1996–2019 Geotools. All rights reserved.