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(char[] cbuf, int off, int len) throws IOException
write
in class FilterWriter
IOException
public void write(String str, int off, int len) throws IOException
write
in class FilterWriter
IOException
public void write(int c) throws IOException
write
in class FilterWriter
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterWriter
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class FilterWriter
IOException
Copyright © 2001–2016. All rights reserved.