|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ho.yaml.YamlDecoder
public class YamlDecoder
YamlDecoder - The usage of YamlDecoder mirrors that of java.beans.XMLDecoder. You create a decoder, make some
calls to readObject, and then close the decoder. 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 | |
---|---|
YamlDecoder(java.io.InputStream in)
Creates a YamlDecoder that reads from specified stream. |
|
YamlDecoder(java.io.Reader reader)
Creates a YamlDecoder that reads from specifed reader. |
|
YamlDecoder(java.io.Reader reader,
YamlConfig config)
Creates a YamlDecoder that reads from specifed reader and YAML config. |
Method Summary | ||
---|---|---|
YamlStream |
asStream()
|
|
|
asStreamOfType(java.lang.Class<T> clazz)
|
|
void |
close()
Closes this decoder instance. |
|
YamlConfig |
getConfig()
returns the Jyaml configuration for this Decoder |
|
boolean |
isSuppressWarnings()
returns whether the suppress warnings option is on |
|
java.lang.Object |
readObject()
Reads one object from the Yaml stream. |
|
|
readObjectOfType(java.lang.Class<T> clazz)
Returns the next object from the Yaml stream given the expected type. |
|
void |
setConfig(YamlConfig config)
set the Jyaml configuration for this decoder |
|
void |
setSuppressWarnings(boolean suppressWarnings)
sets the suppress warnings option |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public YamlDecoder(java.io.InputStream in)
in
- InputStream to read from.public YamlDecoder(java.io.Reader reader)
reader
- Reader to read frompublic YamlDecoder(java.io.Reader reader, YamlConfig config)
reader
- reader to read fromconfig
- YAML configMethod Detail |
---|
public java.lang.Object readObject() throws java.io.EOFException
java.io.EOFException
- - if the end of the Yaml stream has been reached.public <T> YamlStream asStreamOfType(java.lang.Class<T> clazz)
public YamlStream asStream()
public <T> T readObjectOfType(java.lang.Class<T> clazz) throws java.io.EOFException
T
- The type of the object expected.clazz
- the class representing the type of the object expected.
java.io.EOFException
public void close()
public boolean isSuppressWarnings()
public void setSuppressWarnings(boolean suppressWarnings)
suppressWarnings
- true for on; false for off.public YamlConfig getConfig()
public void setConfig(YamlConfig config)
config
- the config object to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |