| org.geotools.io.IndentedLineWriter org.geotools.io.NumberedLineWriter
NumberedLineWriter | public class NumberedLineWriter extends IndentedLineWriter (Code) | | A writer that put line number in front of every line.
version: $Id: NumberedLineWriter.java 24164 2007-02-03 05:10:58Z desruisseaux $ author: Martin Desruisseaux since: 2.1 |
Field Summary | |
final public static PrintWriter | OUT A default numbered line writer to the
. |
Constructor Summary | |
public | NumberedLineWriter(Writer out) Constructs a stream which will write line number in front of each line. |
Method Summary | |
protected void | beginNewLine() Invoked when a new line is begining. | public int | getLineNumber() Returns the current line number. | public void | setLineNumber(int line) Sets the current line number. |
NumberedLineWriter | public NumberedLineWriter(Writer out)(Code) | | Constructs a stream which will write line number in front of each line.
Parameters: out - The underlying stream to write to. |
beginNewLine | protected void beginNewLine() throws IOException(Code) | | Invoked when a new line is begining. The default implementation writes the
current line number.
throws: IOException - If an I/O error occurs |
getLineNumber | public int getLineNumber()(Code) | | Returns the current line number.
|
setLineNumber | public void setLineNumber(int line)(Code) | | Sets the current line number.
Parameters: line - The current line number. |
|
|