|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.Writer
info.aduna.io.IndentingWriter
public class IndentingWriter
A writer that adds indentation to written text.
| Field Summary | |
|---|---|
protected int |
indentationLevel
The current indentation level, i.e. |
protected Writer |
out
The underlying writer. |
| Fields inherited from class java.io.Writer |
|---|
lock |
| Constructor Summary | |
|---|---|
IndentingWriter(Writer out)
|
|
| Method Summary | |
|---|---|
void |
close()
|
void |
decreaseIndentation()
|
void |
flush()
|
int |
getIndentationLevel()
|
String |
getIndentationString()
Gets the string used for indentation. |
void |
increaseIndentation()
|
void |
setIndentationLevel(int indentationLevel)
|
void |
setIndentationString(String indentString)
Sets the string that should be used for indentation. |
void |
write(char[] cbuf,
int off,
int len)
|
void |
writeEOL()
Writes an end-of-line character sequence and triggers the indentation for the text written on the next line. |
| Methods inherited from class java.io.Writer |
|---|
append, append, append, write, write, write, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Writer out
protected int indentationLevel
| Constructor Detail |
|---|
public IndentingWriter(Writer out)
| Method Detail |
|---|
public void setIndentationString(String indentString)
indentString - The indentation string, e.g. a tab or a number of spaces.public String getIndentationString()
public int getIndentationLevel()
public void setIndentationLevel(int indentationLevel)
public void increaseIndentation()
public void decreaseIndentation()
public void writeEOL()
throws IOException
IOException
public void close()
throws IOException
close in interface Closeableclose in class WriterIOException
public void flush()
throws IOException
flush in interface Flushableflush in class WriterIOException
public void write(char[] cbuf,
int off,
int len)
throws IOException
write in class WriterIOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||