Top Description Fields Constructors Methods
org.snakeyaml.engine.v2.api.lowlevel

public Class Compose

extends Object
Class Inheritance
Imports
java.io.InputStream, .Reader, .StringReader, java.util.Iterator, .Objects, .Optional, org.snakeyaml.engine.v2.api.LoadSettings, .YamlUnicodeReader, org.snakeyaml.engine.v2.composer.Composer, org.snakeyaml.engine.v2.nodes.Node, org.snakeyaml.engine.v2.parser.ParserImpl, org.snakeyaml.engine.v2.scanner.StreamReader

Helper to compose input stream to Node

Field Summary

Modifier and TypeField and Description
private final LoadSettings

Constructor Summary

AccessConstructor and Description
public
Compose(LoadSettings
- configuration
settings
)

Create instance with provided LoadSettings

Method Summary

Modifier and TypeMethod and Description
public Iterable<Node>

Returns:

parsed root Nodes for all the specified YAML documents
composeAllFromInputStream
(InputStream
- YAML document(s). Default encoding is UTF-8. The BOM must be present if the encoding is UTF-16 or UTF-32
yaml
)

Parse all YAML documents in a stream and produce corresponding representation trees.

public Iterable<Node>

Returns:

parsed root Nodes for all the specified YAML documents
composeAllFromReader
(Reader
stream of YAML documents
yaml
)

Parse all YAML documents in a stream and produce corresponding representation trees.

public Iterable<Node>

Returns:

parsed root Nodes for all the specified YAML documents
composeAllFromString
(String
- YAML document(s).
yaml
)

Parse all YAML documents in a stream and produce corresponding representation trees.

public Optional<Node>

Returns:

parsed Node if available
composeInputStream
(InputStream
- YAML document(s). Default encoding is UTF-8. The BOM must be present if the encoding is UTF-16 or UTF-32
yaml
)

Parse a YAML stream and produce Node

public Optional<Node>

Returns:

parsed Node if available
composeReader
(Reader
- YAML document(s). Since the encoding is already known the BOM must not be present (it will be parsed as content)
yaml
)

Parse a YAML stream and produce Node

public Optional<Node>

Returns:

parsed Node if available
composeString
(String
- YAML document(s).
yaml
)

Parse a YAML stream and produce Node

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

settingsback to summary
private final LoadSettings settings

Constructor Detail

Composeback to summary
public Compose(LoadSettings settings)

Create instance with provided LoadSettings

Parameters
settings:LoadSettings

- configuration

Method Detail

composeAllFromInputStreamback to summary
public Iterable<Node> composeAllFromInputStream(InputStream yaml)

Parse all YAML documents in a stream and produce corresponding representation trees.

Parameters
yaml:InputStream

- YAML document(s). Default encoding is UTF-8. The BOM must be present if the encoding is UTF-16 or UTF-32

Returns:Iterable<Node>

parsed root Nodes for all the specified YAML documents

See Also
Processing Overview
composeAllFromReaderback to summary
public Iterable<Node> composeAllFromReader(Reader yaml)

Parse all YAML documents in a stream and produce corresponding representation trees.

Parameters
yaml:Reader

stream of YAML documents

Returns:Iterable<Node>

parsed root Nodes for all the specified YAML documents

See Also
Processing Overview
composeAllFromStringback to summary
public Iterable<Node> composeAllFromString(String yaml)

Parse all YAML documents in a stream and produce corresponding representation trees.

Parameters
yaml:String

- YAML document(s).

Returns:Iterable<Node>

parsed root Nodes for all the specified YAML documents

See Also
Processing Overview
composeInputStreamback to summary
public Optional<Node> composeInputStream(InputStream yaml)

Parse a YAML stream and produce Node

Parameters
yaml:InputStream

- YAML document(s). Default encoding is UTF-8. The BOM must be present if the encoding is UTF-16 or UTF-32

Returns:Optional<Node>

parsed Node if available

See Also
Processing Overview
composeReaderback to summary
public Optional<Node> composeReader(Reader yaml)

Parse a YAML stream and produce Node

Parameters
yaml:Reader

- YAML document(s). Since the encoding is already known the BOM must not be present (it will be parsed as content)

Returns:Optional<Node>

parsed Node if available

See Also
Processing Overview
composeStringback to summary
public Optional<Node> composeString(String yaml)

Parse a YAML stream and produce Node

Parameters
yaml:String

- YAML document(s).

Returns:Optional<Node>

parsed Node if available

See Also
Processing Overview