Closeable, Flushable, Appendable, AutoCloseablepublic class AutoIndentWriter extends FilterWriter
FilterWriter that automatically indents lines by looking at
trailing opening braces ('{') and leading closing braces ('}').| Modifier and Type | Field | 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 | Description |
|---|---|
AutoIndentWriter(Writer out) |
| Modifier and Type | Method | 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(char[] cbuf,
int off,
int len)
throws IOException
write in class FilterWriterIOExceptionpublic void write(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 AutoCloseableclose in interface Closeableclose in class FilterWriterIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class FilterWriterIOExceptionCopyright © 2001–2019. All rights reserved.