public class DefaultIndenter extends DefaultPrettyPrinter.NopIndenter
DefaultPrettyPrinter
(unless
overridden). Uses system-specific linefeeds and 2 spaces for indentation per level.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SYS_LF |
static DefaultIndenter |
SYSTEM_LINEFEED_INSTANCE |
instance
Constructor and Description |
---|
DefaultIndenter()
Indent with two spaces and the system's default line feed
|
DefaultIndenter(java.lang.String indent,
java.lang.String eol)
Create an indenter which uses the
indent string to indent one level
and the eol string to separate lines. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getEol() |
java.lang.String |
getIndent() |
boolean |
isInline() |
DefaultIndenter |
withIndent(java.lang.String indent) |
DefaultIndenter |
withLinefeed(java.lang.String lf) |
void |
writeIndentation(JsonGenerator jg,
int level) |
public static final java.lang.String SYS_LF
public static final DefaultIndenter SYSTEM_LINEFEED_INSTANCE
public DefaultIndenter()
public DefaultIndenter(java.lang.String indent, java.lang.String eol)
indent
string to indent one level
and the eol
string to separate lines.public DefaultIndenter withLinefeed(java.lang.String lf)
public DefaultIndenter withIndent(java.lang.String indent)
public boolean isInline()
isInline
in interface DefaultPrettyPrinter.Indenter
isInline
in class DefaultPrettyPrinter.NopIndenter
public void writeIndentation(JsonGenerator jg, int level) throws java.io.IOException
writeIndentation
in interface DefaultPrettyPrinter.Indenter
writeIndentation
in class DefaultPrettyPrinter.NopIndenter
java.io.IOException
public java.lang.String getEol()
public java.lang.String getIndent()
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"