public class YamlWriter extends Object implements AutoCloseable
| 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() |
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 void clearAnchors()
throws YamlException
YamlExceptionYamlConfig.WriteConfig.setAutoAnchor(boolean)public void close()
throws YamlException
close in interface AutoCloseableYamlException - If the buffered output could not be written or the writer could not be closed.Copyright © 2023. All rights reserved.