|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ho.yaml.YamlEncoder
public class YamlEncoder
YamlEncoder - The usage of YamlEncoder mirrors that of java.beans.XMLEncoder. You create an encoder, make some
calls to writeObject, and then close the encoder. In most cases you may find it is not necessary to access this
class directly as Yaml
contain methods for the most common usages. The utility functions that
were previously in this class are now in Yaml
.
Constructor Summary | |
---|---|
YamlEncoder(java.io.OutputStream out)
Creates a YamlEncoder writing to specifed stream. |
|
YamlEncoder(java.io.OutputStream out,
YamlConfig config)
Creates a YamlEncoder writing to specifed stream. |
Method Summary | |
---|---|
void |
close()
Closes this YamlEncoder instance. |
void |
flush()
Flushes the outputStream that this YamlEncoder points to. |
YamlConfig |
getConfig()
|
java.lang.String |
getIndentAmount()
Returns the indentation amount used for one indentation level. |
boolean |
isMinimalOutput()
Returns whether the minimal output option is set. |
void |
setConfig(YamlConfig config)
|
void |
setIndentAmount(java.lang.String indentAmount)
Sets indentation amount. |
void |
setMinimalOutput(boolean minimalOutput)
Sets the minimal output option. |
void |
writeObject(java.lang.Object obj)
Write an object to the stream. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public YamlEncoder(java.io.OutputStream out)
out
- the output stream to write to.public YamlEncoder(java.io.OutputStream out, YamlConfig config)
out
- the output stream to write to.config
- the YAML configMethod Detail |
---|
public java.lang.String getIndentAmount()
public void setIndentAmount(java.lang.String indentAmount)
indentAmount
- must be a string consisting only of spaces.public boolean isMinimalOutput()
public void setMinimalOutput(boolean minimalOutput)
minimalOutput
- true for on; false for off.public void writeObject(java.lang.Object obj)
obj
- object to write.public void close()
public void flush()
public YamlConfig getConfig()
public void setConfig(YamlConfig config)
config
- the new config object for this encoder.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |