| Modifier and Type | Class and Description |
|---|---|
| public static enum | DumperOptions.FlowStyle
Block styles use indentation to denote nesting and scope within the document. |
| public static enum | DumperOptions.LineBreak
Platform dependent line break. |
| public static enum | DumperOptions.NonPrintableStyle
the way to serialize non-printable |
| public static enum | DumperOptions.ScalarStyle
YAML provides a rich set of scalar styles. |
| public static enum | DumperOptions.Version
Specification version. |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private boolean | |
| private AnchorGenerator | |
| private int | |
| private boolean | |
| private DumperOptions. | |
| private DumperOptions. | |
| private boolean | |
| private boolean | |
| private int | |
| private boolean | |
| private int | |
| private DumperOptions. | |
| private int | |
| private DumperOptions. | |
| private Boolean | |
| private boolean | |
| private boolean | |
| private Map | |
| private TimeZone | |
| private DumperOptions. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public AnchorGenerator | |
| public DumperOptions. | |
| public DumperOptions. | |
| public int | |
| public boolean | |
| public int | |
| public DumperOptions. | |
| public int | |
| public DumperOptions. | |
| public boolean | |
| public Map | |
| public TimeZone | |
| public DumperOptions. | |
| public int | |
| public boolean | Returns: false when read-only JavaBean properties are not emittedReport whether read-only JavaBean properties (the ones without setters) should be included in the YAML document |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | Returns: true when comments are not ignored and can be used after composing a Nodegetter |
| public void | setAllowReadOnlyProperties(boolean
- true to dump read-only JavaBean properties allowReadOnlyProperties)Set to true to include read-only JavaBean properties (the ones without setters) in the YAML document. |
| public void | setAllowUnicode(boolean
if allowUnicode is false then all non-ASCII characters are escaped allowUnicode)Specify whether to emit non-ASCII printable Unicode characters. |
| public void | setAnchorGenerator(AnchorGenerator
- the way to create custom anchors anchorGenerator)Provide a custom generator |
| public void | setCanonical(boolean
true produce canonical YAML document canonical)Force the emitter to produce a canonical YAML document. |
| public void | |
| public void | setDefaultScalarStyle(DumperOptions.
set the style for all scalars defaultStyleSet default style for scalars. |
| public void | |
| public void | |
| public void | |
| public void | setIndentWithIndicator(boolean
- true when indent for sequences is added to general indentWithIndicator)Set to true to add the indent for sequences to the general indent |
| public void | setIndicatorIndent(int
value to be used as indent indicatorIndent)Set number of white spaces to use for the sequence indicator '-' |
| public void | setLineBreak(DumperOptions.
to be used for the input lineBreakSpecify the line break to separate the lines. |
| public void | setMaxSimpleKeyLength(int
- the limit after which the key gets explicit key indicator '?' maxSimpleKeyLength)Define max key length to use simple key (without '?') More info https://yaml.org/spec/1.1/#id934537 |
| public void | setNonPrintableStyle(DumperOptions.
ESCAPE to force SnakeYAML to keep !!str tag for non-printable data styleWhen String contains non-printable characters SnakeYAML convert it to binary data with the !!binary tag. |
| public void | setPrettyFlow(boolean
true produce pretty flow YAML document prettyFlow)Force the emitter to produce a pretty YAML document when using the flow style. |
| public void | setProcessComments(boolean
true to process; false to ignoreSet the comment processing. |
| public void | setSplitLines(boolean
whether to split lines exceeding preferred width for scalars. splitLines)Specify whether to split lines exceeding preferred width for scalars. |
| public void | |
| public void | setTimeZone(TimeZone
for created Dates or null to use UTC timeZone)Set the timezone to be used for Date. |
| public void | setVersion(DumperOptions.
1.0 or 1.1 versionOf no use - it is better not to include YAML version as the directive |
| public void |
| allowReadOnlyProperties | back to summary |
|---|---|
| private boolean allowReadOnlyProperties | |
| allowUnicode | back to summary |
|---|---|
| private boolean allowUnicode | |
| anchorGenerator | back to summary |
|---|---|
| private AnchorGenerator anchorGenerator | |
| bestWidth | back to summary |
|---|---|
| private int bestWidth | |
| canonical | back to summary |
|---|---|
| private boolean canonical | |
| defaultFlowStyle | back to summary |
|---|---|
| private DumperOptions. | |
| defaultStyle | back to summary |
|---|---|
| private DumperOptions. | |
| explicitEnd | back to summary |
|---|---|
| private boolean explicitEnd | |
| explicitStart | back to summary |
|---|---|
| private boolean explicitStart | |
| indent | back to summary |
|---|---|
| private int indent | |
| indentWithIndicator | back to summary |
|---|---|
| private boolean indentWithIndicator | |
| indicatorIndent | back to summary |
|---|---|
| private int indicatorIndent | |
| lineBreak | back to summary |
|---|---|
| private DumperOptions. | |
| maxSimpleKeyLength | back to summary |
|---|---|
| private int maxSimpleKeyLength | |
| nonPrintableStyle | back to summary |
|---|---|
| private DumperOptions. | |
| prettyFlow | back to summary |
|---|---|
| private Boolean prettyFlow | |
| processComments | back to summary |
|---|---|
| private boolean processComments | |
| splitLines | back to summary |
|---|---|
| private boolean splitLines | |
| tags | back to summary |
|---|---|
| private Map<String, String> tags | |
| timeZone | back to summary |
|---|---|
| private TimeZone timeZone | |
| version | back to summary |
|---|---|
| private DumperOptions. | |
| DumperOptions | back to summary |
|---|---|
| public DumperOptions() | |
| getAnchorGenerator | back to summary |
|---|---|
| public AnchorGenerator getAnchorGenerator() getter
| |
| getDefaultFlowStyle | back to summary |
|---|---|
| public DumperOptions. getter
| |
| getDefaultScalarStyle | back to summary |
|---|---|
| public DumperOptions. getter
| |
| getIndent | back to summary |
|---|---|
| public int getIndent() getter
| |
| getIndentWithIndicator | back to summary |
|---|---|
| public boolean getIndentWithIndicator() | |
| getIndicatorIndent | back to summary |
|---|---|
| public int getIndicatorIndent() | |
| getLineBreak | back to summary |
|---|---|
| public DumperOptions. getter
| |
| getMaxSimpleKeyLength | back to summary |
|---|---|
| public int getMaxSimpleKeyLength() | |
| getNonPrintableStyle | back to summary |
|---|---|
| public DumperOptions. | |
| getSplitLines | back to summary |
|---|---|
| public boolean getSplitLines() getter
| |
| getTags | back to summary |
|---|---|
| public Map getter | |
| getTimeZone | back to summary |
|---|---|
| public TimeZone getTimeZone() getter
| |
| getVersion | back to summary |
|---|---|
| public DumperOptions. getter
| |
| getWidth | back to summary |
|---|---|
| public int getWidth() getter
| |
| isAllowReadOnlyProperties | back to summary |
|---|---|
| public boolean isAllowReadOnlyProperties() Report whether read-only JavaBean properties (the ones without setters) should be included in the YAML document
| |
| isAllowUnicode | back to summary |
|---|---|
| public boolean isAllowUnicode() getter
| |
| isCanonical | back to summary |
|---|---|
| public boolean isCanonical() getter
| |
| isExplicitEnd | back to summary |
|---|---|
| public boolean isExplicitEnd() getter
| |
| isExplicitStart | back to summary |
|---|---|
| public boolean isExplicitStart() getter
| |
| isPrettyFlow | back to summary |
|---|---|
| public boolean isPrettyFlow() getter
| |
| isProcessComments | back to summary |
|---|---|
| public boolean isProcessComments() getter
| |
| setAllowReadOnlyProperties | back to summary |
|---|---|
| public void setAllowReadOnlyProperties(boolean allowReadOnlyProperties) Set to true to include read-only JavaBean properties (the ones without setters) in the YAML document. By default these properties are not included to be able to parse later the same JavaBean.
| |
| setAllowUnicode | back to summary |
|---|---|
| public void setAllowUnicode(boolean allowUnicode) Specify whether to emit non-ASCII printable Unicode characters. The default value is true. When set to false then printable non-ASCII characters (Cyrillic, Chinese etc) will be not printed but escaped (to support ASCII terminals)
| |
| setAnchorGenerator | back to summary |
|---|---|
| public void setAnchorGenerator(AnchorGenerator anchorGenerator) Provide a custom generator
| |
| setCanonical | back to summary |
|---|---|
| public void setCanonical(boolean canonical) Force the emitter to produce a canonical YAML document.
| |
| setDefaultFlowStyle | back to summary |
|---|---|
| public void setDefaultFlowStyle(DumperOptions. setter
| |
| setDefaultScalarStyle | back to summary |
|---|---|
| public void setDefaultScalarStyle(DumperOptions. Set default style for scalars. See YAML 1.1 specification, 2.3 Scalars (http://yaml.org/spec/1.1/#id858081)
| |
| setExplicitEnd | back to summary |
|---|---|
| public void setExplicitEnd(boolean explicitEnd) setter - require explicit '...'
| |
| setExplicitStart | back to summary |
|---|---|
| public void setExplicitStart(boolean explicitStart) setter - require explicit '...'
| |
| setIndent | back to summary |
|---|---|
| public void setIndent(int indent) Define indentation. Must be within the limits (1-10)
| |
| setIndentWithIndicator | back to summary |
|---|---|
| public void setIndentWithIndicator(boolean indentWithIndicator) Set to true to add the indent for sequences to the general indent
| |
| setIndicatorIndent | back to summary |
|---|---|
| public void setIndicatorIndent(int indicatorIndent) Set number of white spaces to use for the sequence indicator '-'
| |
| setLineBreak | back to summary |
|---|---|
| public void setLineBreak(DumperOptions. Specify the line break to separate the lines. It is platform specific: Windows - "\r\n", old MacOS - "\r", Unix - "\n". The default value is the one for Unix.
| |
| setMaxSimpleKeyLength | back to summary |
|---|---|
| public void setMaxSimpleKeyLength(int maxSimpleKeyLength) Define max key length to use simple key (without '?') More info https://yaml.org/spec/1.1/#id934537
| |
| setNonPrintableStyle | back to summary |
|---|---|
| public void setNonPrintableStyle(DumperOptions. When String contains non-printable characters SnakeYAML convert it to binary data with the !!binary tag. Set this to ESCAPE to keep the !!str tag and escape the non-printable chars with \\x or \\u
| |
| setPrettyFlow | back to summary |
|---|---|
| public void setPrettyFlow(boolean prettyFlow) Force the emitter to produce a pretty YAML document when using the flow style.
| |
| setProcessComments | back to summary |
|---|---|
| public void setProcessComments(boolean processComments) Set the comment processing. By default, comments are ignored.
| |
| setSplitLines | back to summary |
|---|---|
| public void setSplitLines(boolean splitLines) Specify whether to split lines exceeding preferred width for scalars. The default is true.
| |
| setTags | back to summary |
|---|---|
| public void setTags(Map<String, String> tags) setter | |
| setTimeZone | back to summary |
|---|---|
| public void setTimeZone(TimeZone timeZone) Set the timezone to be used for Date. If set to
| |
| setVersion | back to summary |
|---|---|
| public void setVersion(DumperOptions. Of no use - it is better not to include YAML version as the directive
| |
| setWidth | back to summary |
|---|---|
| public void setWidth(int bestWidth) Specify the preferred width to emit scalars. When the scalar representation takes more then the preferred with the scalar will be split into a few lines. The default is 80.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final DumperOptions. | AUTO
Auto (first block, than flow) |
| public static final DumperOptions. | BLOCK
Block style |
| public static final DumperOptions. | FLOW
Flow style |
| private final Boolean |
| Modifier and Type | Method and Description |
|---|---|
| public String | toString()
Overrides java. |
| public static DumperOptions. | |
| public static DumperOptions. |
| AUTO | back to summary |
|---|---|
| public static final DumperOptions. Auto (first block, than flow) | |
| BLOCK | back to summary |
|---|---|
| public static final DumperOptions. Block style | |
| FLOW | back to summary |
|---|---|
| public static final DumperOptions. Flow style | |
| styleBoolean | back to summary |
|---|---|
| private final Boolean styleBoolean | |
| FlowStyle | back to summary |
|---|---|
| private FlowStyle(Boolean flowStyle) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns the name of this enum constant, as contained in the declaration. This method may be overridden, though it typically isn't necessary or desirable. An enum class should override this method when a more "programmer-friendly" string form exists. | |
| valueOf | back to summary |
|---|---|
| public static DumperOptions. | |
| values | back to summary |
|---|---|
| public static DumperOptions. | |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| public static final DumperOptions. | MAC
Old Mac (should not be used !) |
| public static final DumperOptions. | UNIX
Linux and Mac |
| public static final DumperOptions. | WIN
Windows |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static DumperOptions. | Returns: detected line breakGet the line break used by the current Operating System |
| public String | |
| public String | |
| public static DumperOptions. | |
| public static DumperOptions. |
| lineBreak | back to summary |
|---|---|
| private final String lineBreak | |
| MAC | back to summary |
|---|---|
| public static final DumperOptions. Old Mac (should not be used !) | |
| UNIX | back to summary |
|---|---|
| public static final DumperOptions. Linux and Mac | |
| WIN | back to summary |
|---|---|
| public static final DumperOptions. Windows | |
| LineBreak | back to summary |
|---|---|
| private LineBreak(String lineBreak) Create
| |
| getPlatformLineBreak | back to summary |
|---|---|
| public static DumperOptions. Get the line break used by the current Operating System
| |
| getString | back to summary |
|---|---|
| public String getString() getter
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. for humans | |
| valueOf | back to summary |
|---|---|
| public static DumperOptions. | |
| values | back to summary |
|---|---|
| public static DumperOptions. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final DumperOptions. | BINARY
Transform String to binary if it contains non-printable characters |
| public static final DumperOptions. | ESCAPE
Escape non-printable characters |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static DumperOptions. | |
| public static DumperOptions. |
| BINARY | back to summary |
|---|---|
| public static final DumperOptions. Transform String to binary if it contains non-printable characters | |
| ESCAPE | back to summary |
|---|---|
| public static final DumperOptions. Escape non-printable characters | |
| NonPrintableStyle | back to summary |
|---|---|
| private NonPrintableStyle() | |
| valueOf | back to summary |
|---|---|
| public static DumperOptions. | |
| values | back to summary |
|---|---|
| public static DumperOptions. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final DumperOptions. | DOUBLE_QUOTED
Double quoted scalar |
| public static final DumperOptions. | FOLDED
Folded scalar |
| public static final DumperOptions. | LITERAL
Literal scalar |
| public static final DumperOptions. | PLAIN
Plain scalar |
| public static final DumperOptions. | SINGLE_QUOTED
Single quoted scalar |
| private final Character |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static DumperOptions. | |
| public Character | |
| public String | |
| public static DumperOptions. | |
| public static DumperOptions. |
| DOUBLE_QUOTED | back to summary |
|---|---|
| public static final DumperOptions. Double quoted scalar | |
| FOLDED | back to summary |
|---|---|
| public static final DumperOptions. Folded scalar | |
| LITERAL | back to summary |
|---|---|
| public static final DumperOptions. Literal scalar | |
| PLAIN | back to summary |
|---|---|
| public static final DumperOptions. Plain scalar | |
| SINGLE_QUOTED | back to summary |
|---|---|
| public static final DumperOptions. Single quoted scalar | |
| styleChar | back to summary |
|---|---|
| private final Character styleChar | |
| ScalarStyle | back to summary |
|---|---|
| private ScalarStyle(Character style) | |
| createStyle | back to summary |
|---|---|
| public static DumperOptions. Create
| |
| getChar | back to summary |
|---|---|
| public Character getChar() getter
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Readable style | |
| valueOf | back to summary |
|---|---|
| public static DumperOptions. | |
| values | back to summary |
|---|---|
| public static DumperOptions. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final DumperOptions. | V1_0
1.0 |
| public static final DumperOptions. | V1_1
1.1 |
| private final Integer[] |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public int | |
| public int | |
| public String | |
| public static DumperOptions. | |
| public static DumperOptions. |
| V1_0 | back to summary |
|---|---|
| public static final DumperOptions. 1.0 | |
| V1_1 | back to summary |
|---|---|
| public static final DumperOptions. 1.1 | |
| version | back to summary |
|---|---|
| private final Integer[] version | |
| Version | back to summary |
|---|---|
| private Version(Integer[] version) Create
| |
| getRepresentation | back to summary |
|---|---|
| public String getRepresentation() getter
| |
| major | back to summary |
|---|---|
| public int major() getter
| |
| minor | back to summary |
|---|---|
| public int minor() Minor part (0 or 1)
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Readable string | |
| valueOf | back to summary |
|---|---|
| public static DumperOptions. | |
| values | back to summary |
|---|---|
| public static DumperOptions. | |