Class Dump
java.lang.Object
org.snakeyaml.engine.v2.api.Dump
Common way to serialize any Java instance(s). The instance is stateful. Only one of the 'dump'
methods may be called, and it may be called only once.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BaseRepresenterThe component to translate Java instances to Nodesprotected DumpSettingsConfiguration options -
Constructor Summary
ConstructorsConstructorDescriptionDump(DumpSettings settings) Create instanceDump(DumpSettings settings, BaseRepresenter representer) Create instance -
Method Summary
Modifier and TypeMethodDescriptionvoiddump(Object yaml, StreamDataWriter streamDataWriter) Dump a single instance into a YAML documentvoiddumpAll(Iterator<? extends Object> instancesIterator, StreamDataWriter streamDataWriter) Dump all the instances from the iterator into a stream with every instance in a separate YAML documentdumpAllToString(Iterator<? extends Object> instancesIterator) Dump all the instances from the iterator into a stream with every instance in a separate YAML documentvoiddumpNode(Node node, StreamDataWriter streamDataWriter) Dump the provided Node into a YAML stream.dumpToString(Object yaml) Dump all the instances from the iterator into a stream with every instance in a separate YAML document
-
Field Details
-
settings
Configuration options -
representer
The component to translate Java instances to Nodes
-
-
Constructor Details
-
Dump
-
Dump
Create instance- Parameters:
settings- - configurationrepresenter- - custom representer
-
-
Method Details
-
dumpAll
public void dumpAll(Iterator<? extends Object> instancesIterator, StreamDataWriter streamDataWriter) Dump all the instances from the iterator into a stream with every instance in a separate YAML document- Parameters:
instancesIterator- - instances to serializestreamDataWriter- - destination I/O writer
-
dump
Dump a single instance into a YAML document- Parameters:
yaml- - instance to serializestreamDataWriter- - destination I/O writer
-
dumpAllToString
-
dumpToString
-
dumpNode
Dump the provided Node into a YAML stream.- Parameters:
node- - YAML node to be serialized to YAML documentstreamDataWriter- - stream to write to
-