org.codehaus.janino.util
Class AutoIndentWriter
java.lang.Object
java.io.Writer
java.io.FilterWriter
org.codehaus.janino.util.AutoIndentWriter
- public class AutoIndentWriter
- extends FilterWriter
A FilterWriter
that automatically indents lines by looking at
trailing opening braces ('{') and leading closing braces ('}').
Method Summary |
void |
indent()
|
void |
setPrefix(String prefix)
The prefix, if non-null, is printed between the indentation space and
the line data. |
void |
unindent()
|
void |
write(char[] cbuf,
int off,
int len)
|
void |
write(int c)
|
void |
write(String str,
int off,
int len)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AutoIndentWriter
public AutoIndentWriter(Writer out)
write
public void write(int c)
throws IOException
- Throws:
IOException
unindent
public void unindent()
indent
public void indent()
setPrefix
public void setPrefix(String prefix)
- The prefix, if non-null, is printed between the indentation space and
the line data.
write
public void write(char[] cbuf,
int off,
int len)
throws IOException
- Throws:
IOException
write
public void write(String str,
int off,
int len)
throws IOException
- Throws:
IOException