Class Compose
- java.lang.Object
-
- org.snakeyaml.engine.v2.api.lowlevel.Compose
-
public class Compose extends java.lang.Object
Helper to compose input stream to Node
-
-
Field Summary
Fields Modifier and Type Field Description private LoadSettings
settings
-
Constructor Summary
Constructors Constructor Description Compose(LoadSettings settings)
Create instance with providedLoadSettings
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Iterable<Node>
composeAllFromInputStream(java.io.InputStream yaml)
Parse all YAML documents in a stream and produce corresponding representation trees.java.lang.Iterable<Node>
composeAllFromReader(java.io.Reader yaml)
Parse all YAML documents in a stream and produce corresponding representation trees.java.lang.Iterable<Node>
composeAllFromString(java.lang.String yaml)
Parse all YAML documents in a stream and produce corresponding representation trees.java.util.Optional<Node>
composeInputStream(java.io.InputStream yaml)
Parse a YAML stream and produceNode
java.util.Optional<Node>
composeReader(java.io.Reader yaml)
Parse a YAML stream and produceNode
java.util.Optional<Node>
composeString(java.lang.String yaml)
Parse a YAML stream and produceNode
-
-
-
Field Detail
-
settings
private final LoadSettings settings
-
-
Constructor Detail
-
Compose
public Compose(LoadSettings settings)
Create instance with providedLoadSettings
- Parameters:
settings
- - configuration
-
-
Method Detail
-
composeReader
public java.util.Optional<Node> composeReader(java.io.Reader yaml)
Parse a YAML stream and produceNode
- Parameters:
yaml
- - YAML document(s). Since the encoding is already known the BOM must not be present (it will be parsed as content)- Returns:
- parsed
Node
if available - See Also:
- Processing Overview
-
composeInputStream
public java.util.Optional<Node> composeInputStream(java.io.InputStream yaml)
Parse a YAML stream and produceNode
- Parameters:
yaml
- - YAML document(s). Default encoding is UTF-8. The BOM must be present if the encoding is UTF-16 or UTF-32- Returns:
- parsed
Node
if available - See Also:
- Processing Overview
-
composeString
public java.util.Optional<Node> composeString(java.lang.String yaml)
Parse a YAML stream and produceNode
- Parameters:
yaml
- - YAML document(s).- Returns:
- parsed
Node
if available - See Also:
- Processing Overview
-
composeAllFromReader
public java.lang.Iterable<Node> composeAllFromReader(java.io.Reader yaml)
Parse all YAML documents in a stream and produce corresponding representation trees.- Parameters:
yaml
- stream of YAML documents- Returns:
- parsed root Nodes for all the specified YAML documents
- See Also:
- Processing Overview
-
composeAllFromInputStream
public java.lang.Iterable<Node> composeAllFromInputStream(java.io.InputStream yaml)
Parse all YAML documents in a stream and produce corresponding representation trees.- Parameters:
yaml
- - YAML document(s). Default encoding is UTF-8. The BOM must be present if the encoding is UTF-16 or UTF-32- Returns:
- parsed root Nodes for all the specified YAML documents
- See Also:
- Processing Overview
-
composeAllFromString
public java.lang.Iterable<Node> composeAllFromString(java.lang.String yaml)
Parse all YAML documents in a stream and produce corresponding representation trees.- Parameters:
yaml
- - YAML document(s).- Returns:
- parsed root Nodes for all the specified YAML documents
- See Also:
- Processing Overview
-
-