| java.lang.Object java.io.Writer java.io.FilterWriter org.geotools.io.IndentedLineWriter
All known Subclasses: org.geotools.io.NumberedLineWriter,
IndentedLineWriter | public class IndentedLineWriter extends FilterWriter (Code) | | A writer that put some spaces in front of every line. The indentation is initially set
to 0 spaces. Users must invoke
IndentedLineWriter.setIndentation in order to set a different value.
version: $Id: IndentedLineWriter.java 24164 2007-02-03 05:10:58Z desruisseaux $ author: Martin Desruisseaux since: 2.4 |
Constructor Summary | |
public | IndentedLineWriter(Writer out) Constructs a stream which will add spaces in front of each line. |
Method Summary | |
protected void | beginNewLine() Invoked when a new line is begining. | public int | getIdentation() Returns the current indentation. | public void | setIndentation(int width) Sets the indentation to the specified value. | public void | write(int c) Writes a single character. | public void | write(char[] buffer, int offset, int length) Writes a portion of an array of characters. | public void | write(String string, int offset, int length) Writes a portion of a string. |
IndentedLineWriter | public IndentedLineWriter(Writer out)(Code) | | Constructs a stream which will add spaces in front of each line.
Parameters: out - The underlying stream to write to. |
getIdentation | public int getIdentation()(Code) | | Returns the current indentation.
|
setIndentation | public void setIndentation(int width)(Code) | | Sets the indentation to the specified value.
|
write | public void write(char[] buffer, int offset, int length) throws IOException(Code) | | Writes a portion of an array of characters.
Parameters: buffer - Buffer of characters to be written Parameters: offset - Offset from which to start reading characters Parameters: length - Number of characters to be written throws: IOException - If an I/O error occurs |
write | public void write(String string, int offset, int length) throws IOException(Code) | | Writes a portion of a string.
Parameters: string - String to be written Parameters: offset - Offset from which to start reading characters Parameters: length - Number of characters to be written throws: IOException - If an I/O error occurs |
|
|