net.sourceforge.yamlbeans
Class YamlWriter

java.lang.Object
  extended by net.sourceforge.yamlbeans.YamlWriter

public class YamlWriter
extends java.lang.Object

Serializes Java objects as YAML.


Constructor Summary
YamlWriter(java.io.Writer writer)
           
YamlWriter(java.io.Writer writer, YamlConfig config)
           
 
Method Summary
 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.
static void main(java.lang.String[] args)
           
 void write(java.lang.Object object)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YamlWriter

public YamlWriter(java.io.Writer writer)

YamlWriter

public YamlWriter(java.io.Writer writer,
                  YamlConfig config)
Method Detail

write

public void write(java.lang.Object object)
           throws YamlException
Throws:
YamlException

getConfig

public YamlConfig getConfig()

getEmitter

public Emitter getEmitter()
Returns the YAML emitter, which allows the YAML output to be configured.


clearAnchors

public void clearAnchors()
                  throws YamlException
Writes any buffered objects, then resets the list of anchored objects.

Throws:
YamlException
See Also:
YamlConfig.WriteConfig.setAutoAnchor(boolean)

close

public void close()
           throws YamlException
Finishes writing any buffered output and releases all resources.

Throws:
YamlException - If the buffered output could not be written or the writer could not be closed.

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception