Package com.dslplatform.json
Class PrettifyOutputStream
java.lang.Object
java.io.OutputStream
com.dslplatform.json.PrettifyOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate intprivate static final intprivate final intprivate final PrettifyOutputStream.IndentTypeprivate booleanprivate booleanprivate final OutputStreamprivate static final boolean[] -
Constructor Summary
ConstructorsConstructorDescriptionPrettifyOutputStream(OutputStream out, PrettifyOutputStream.IndentType indentType, int indentLength) -
Method Summary
Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream, write
-
Field Details
-
INDENT_CACHE_SIZE
private static final int INDENT_CACHE_SIZE- See Also:
-
WHITESPACE
private static final boolean[] WHITESPACE -
out
-
indentType
-
indentLength
private final int indentLength -
currentIndent
private int currentIndent -
inString
private boolean inString -
inEscape
private boolean inEscape -
beginObjectOrList
private boolean beginObjectOrList
-
-
Constructor Details
-
PrettifyOutputStream
-
PrettifyOutputStream
public PrettifyOutputStream(OutputStream out, PrettifyOutputStream.IndentType indentType, int indentLength)
-
-
Method Details
-
write
- Overrides:
writein classOutputStream- Throws:
IOException
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
writeNewLineWithIndent
- Throws:
IOException
-