|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.Writer
java.io.FilterWriter
org.geotools.io.IndentedLineWriter
public class IndentedLineWriter
A writer that put some spaces in front of every lines. The indentation is initially set
to 0 spaces. Users must invoke setIndentation(int)
in order to set a different value.
Field Summary |
---|
Fields inherited from class java.io.FilterWriter |
---|
out |
Fields inherited from class java.io.Writer |
---|
lock |
Constructor Summary | |
---|---|
IndentedLineWriter(java.io.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. |
int |
getIdentation()
Returns the current indentation. |
void |
setIndentation(int width)
Sets the indentation to the specified value. |
void |
write(char[] buffer,
int offset,
int length)
Writes a portion of an array of characters. |
void |
write(int c)
Writes a single character. |
void |
write(java.lang.String string,
int offset,
int length)
Writes a portion of a string. |
Methods inherited from class java.io.FilterWriter |
---|
close, flush |
Methods inherited from class java.io.Writer |
---|
append, append, append, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IndentedLineWriter(java.io.Writer out)
out
- The underlying stream to write to.Method Detail |
---|
public int getIdentation()
public void setIndentation(int width)
width
- The new indentation.protected void beginNewLine() throws java.io.IOException
setIndentation(int)
.
java.io.IOException
- If an I/O error occurspublic void write(int c) throws java.io.IOException
write
in class java.io.FilterWriter
java.io.IOException
- If an I/O error occurs.public void write(char[] buffer, int offset, int length) throws java.io.IOException
write
in class java.io.FilterWriter
buffer
- Buffer of characters to be written.offset
- Offset from which to start reading characters.length
- Number of characters to be written.
java.io.IOException
- If an I/O error occurs.public void write(java.lang.String string, int offset, int length) throws java.io.IOException
write
in class java.io.FilterWriter
string
- String to be written.offset
- Offset from which to start reading characters.length
- Number of characters to be written.
java.io.IOException
- If an I/O error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |