public class YamlWriter extends Object
| Constructor and Description |
|---|
YamlWriter(Writer writer) |
YamlWriter(Writer writer,
YamlConfig config) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearAnchors()
Writes any buffered objects, then resets the list of anchored objects.
|
void |
close()
Finishes writing any buffered output and releases all resources.
|
YamlConfig |
getConfig() |
Emitter |
getEmitter()
Returns the YAML emitter, which allows the YAML output to be configured.
|
void |
setAlias(Object object,
String alias) |
void |
write(Object object) |
public YamlWriter(Writer writer)
public YamlWriter(Writer writer, YamlConfig config)
public void write(Object object) throws YamlException
YamlExceptionpublic YamlConfig getConfig()
public Emitter getEmitter()
public void clearAnchors()
throws YamlException
YamlExceptionYamlConfig.WriteConfig.setAutoAnchor(boolean)public void close()
throws YamlException
YamlException - If the buffered output could not be written or the writer could not be closed.Copyright © 2020. All rights reserved.