append
or soft-wrapping spaces using wrappingSpace.
| Modifier and Type | Class and Description |
|---|---|
| private static enum | |
| pack-priv static class | LineWrapper.RecordingAppendable
A delegating |
| Modifier and Type | Field and Description |
|---|---|
| private final StringBuilder | buffer
Characters written since the last wrapping space that haven't yet been flushed. |
| private boolean | |
| private int | column
The number of characters since the most recent newline. |
| private final int | |
| private final String | |
| private int | indentLevel
-1 if we have no buffering; otherwise the number of |
| private LineWrapper. | |
| private final LineWrapper. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| pack-priv void | |
| private void | flush(LineWrapper.
Write the space followed by any buffered text that follows it. |
| pack-priv char | |
| pack-priv void | |
| pack-priv void | zeroWidthSpace(int indentLevel)
Emit a newline character if the line will exceed it's limit, otherwise do nothing. |
| buffer | back to summary |
|---|---|
| private final StringBuilder buffer Characters written since the last wrapping space that haven't yet been flushed. | |
| closed | back to summary |
|---|---|
| private boolean closed | |
| column | back to summary |
|---|---|
| private int column The number of characters since the most recent newline. Includes both out and the buffer. | |
| columnLimit | back to summary |
|---|---|
| private final int columnLimit | |
| indent | back to summary |
|---|---|
| private final String indent | |
| indentLevel | back to summary |
|---|---|
| private int indentLevel -1 if we have no buffering; otherwise the number of | |
| nextFlush | back to summary |
|---|---|
| private LineWrapper. Null if we have no buffering; otherwise the type to pass to the next call to | |
| out | back to summary |
|---|---|
| private final LineWrapper. | |
| LineWrapper | back to summary |
|---|---|
| pack-priv LineWrapper(Appendable out, String indent, int columnLimit) | |
| append | back to summary |
|---|---|
| pack-priv void append(String s) throws IOException Emit | |
| close | back to summary |
|---|---|
| pack-priv void close() throws IOException Flush any outstanding text and forbid future writes to this line wrapper. | |
| flush | back to summary |
|---|---|
| private void flush(LineWrapper. Write the space followed by any buffered text that follows it. | |
| lastChar | back to summary |
|---|---|
pack-priv char lastChar()
| |
| wrappingSpace | back to summary |
|---|---|
| pack-priv void wrappingSpace(int indentLevel) throws IOException Emit either a space or a newline character. | |
| zeroWidthSpace | back to summary |
|---|---|
| pack-priv void zeroWidthSpace(int indentLevel) throws IOException Emit a newline character if the line will exceed it's limit, otherwise do nothing. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final LineWrapper. | |
| public static final LineWrapper. | |
| public static final LineWrapper. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static LineWrapper. | |
| public static LineWrapper. |
| EMPTY | back to summary |
|---|---|
| public static final LineWrapper. | |
| SPACE | back to summary |
|---|---|
| public static final LineWrapper. | |
| WRAP | back to summary |
|---|---|
| public static final LineWrapper. | |
| FlushType | back to summary |
|---|---|
| private FlushType() | |
| valueOf | back to summary |
|---|---|
| public static LineWrapper. | |
| values | back to summary |
|---|---|
| public static LineWrapper. | |
Appendable that records info about the chars passing through it.
| Modifier and Type | Field and Description |
|---|---|
| private final Appendable | |
| pack-priv char |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Appendable | append(CharSequence
The character sequence to append. If csq)csq is
null, then the four characters "null" are
appended to this Appendable.Implements java. Appendable.
|
| public Appendable | append(CharSequence
The character sequence from which a subsequence will be
appended. If csq, int csq is null, then characters
will be appended as if csq contained the four
characters "null".The index of the first character in the subsequence start, int The index of the character following the last character in the
subsequence end)Implements java. Appendable.
|
| public Appendable | append(char
The character to append c)Implements java. Appendable.
|
| delegate | back to summary |
|---|---|
| private final Appendable delegate | |
| lastChar | back to summary |
|---|---|
| pack-priv char lastChar | |
| RecordingAppendable | back to summary |
|---|---|
| pack-priv RecordingAppendable(Appendable delegate) | |
| append | back to summary |
|---|---|
| public Appendable append(CharSequence csq) throws IOException Implements java. Doc from java. Appends the specified character sequence to this Depending on which class implements the character sequence
| |
| append | back to summary |
|---|---|
| public Appendable append(CharSequence csq, int start, int end) throws IOException Implements java. Doc from java. Appends a subsequence of the specified character sequence to this
An invocation of this method of the form
out.append(csq.subSequence(start, end))
| |
| append | back to summary |
|---|---|
| public Appendable append(char c) throws IOException Implements java. Doc from java. Appends the specified character to this
| |