private static final class JsonFormat.PrettyTextGenerator extends java.lang.Object implements JsonFormat.TextGenerator
Modifier and Type | Field and Description |
---|---|
private boolean |
atStartOfLine |
private java.lang.StringBuilder |
indent |
private java.lang.Appendable |
output |
Modifier | Constructor and Description |
---|---|
private |
PrettyTextGenerator(java.lang.Appendable output) |
Modifier and Type | Method and Description |
---|---|
void |
indent()
Indent text by two spaces.
|
void |
outdent()
Reduces the current indent level by two spaces, or crashes if the indent level is zero.
|
void |
print(java.lang.CharSequence text)
Print text to the output stream.
|
private void |
write(java.lang.CharSequence data) |
private final java.lang.Appendable output
private final java.lang.StringBuilder indent
private boolean atStartOfLine
public void indent()
indent
in interface JsonFormat.TextGenerator
public void outdent()
outdent
in interface JsonFormat.TextGenerator
public void print(java.lang.CharSequence text) throws java.io.IOException
print
in interface JsonFormat.TextGenerator
java.io.IOException
private void write(java.lang.CharSequence data) throws java.io.IOException
java.io.IOException