public class AutoIndentWriter extends FilterWriter
FilterWriter that automatically indents lines by looking at trailing opening braces ('{') and
leading closing braces ('}').| Modifier and Type | Field and Description |
|---|---|
static char |
CLEAR_TABULATORS
Special character indicating to clear all tabluar layout that was configured through
TABULATOR. |
static char |
INDENT
Special character that inserts a line break and indents the following text by one position.
|
static char |
TABULATOR
Special character indicating a tabular layout of the following text.
|
static char |
UNINDENT
Special character that inserts a line break and unindents the following text by one position.
|
out| Constructor and Description |
|---|
AutoIndentWriter(Writer out) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
void |
write(char[] cbuf,
int off,
int len) |
void |
write(int c) |
void |
write(String str,
int off,
int len) |
public static final char TABULATOR
public static final char CLEAR_TABULATORS
TABULATOR.public static final char INDENT
public static final char UNINDENT
public AutoIndentWriter(Writer out)
public void write(@Nullable char[] cbuf, int off, int len) throws IOException
write in class FilterWriterIOExceptionpublic void write(@Nullable String str, int off, int len) throws IOException
write in class FilterWriterIOExceptionpublic void write(int c)
throws IOException
write in class FilterWriterIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterWriterIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class FilterWriterIOException