|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.Reader java.io.FilterReader org.umber.bellows.loader.DatumReader
Reader for converting an XML stream into a Datum object tree. Instantiates one Datum object for every element in the XML document, and sets Datum properties for each XML attribute. Attempts to deal with XML namespaces as best as it can.
Field Summary |
Fields inherited from class java.io.FilterReader |
in |
Fields inherited from class java.io.Reader |
lock |
Constructor Summary | |
DatumReader(java.io.Reader in)
Creates a new instance of DatumReader. |
|
DatumReader(java.io.Reader in,
java.lang.String parserClass)
Creates a new instance of DatumReader which uses the custom XML parser class. |
|
DatumReader(java.io.Reader in,
java.lang.String parserClass,
java.lang.String baseURI)
Creates a new instance of DatumReader which uses the custom XML parser class and the base URI to resolve relative URIs in the XML document. |
Method Summary | |
void |
close()
|
static Datum |
fromXml(java.lang.String xml)
Convenience method to convert an XML string directly into a Datum tree. |
boolean |
markSupported()
|
int |
read()
Reads one character at a time, until the end of the current XML document. |
int |
read(char[] buf,
int offset,
int length)
|
Datum |
readXml()
Reads an XML document from the input Reader and converts it into a Datum tree. |
Methods inherited from class java.io.FilterReader |
mark, ready, reset, skip |
Methods inherited from class java.io.Reader |
read |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DatumReader(java.io.Reader in)
in
- Reader instance to wrappublic DatumReader(java.io.Reader in, java.lang.String parserClass)
in
- Reader instance to wrapparserClass
- the fully qualified XML parser classpublic DatumReader(java.io.Reader in, java.lang.String parserClass, java.lang.String baseURI)
in
- Reader instance to wrapparserClass
- the fully qualified XML parser classbaseURI
- the base path for resolving relative URIsMethod Detail |
public Datum readXml() throws UmberClassException, BellowsIOException, BellowsParseException
UmberClassException
- if unable to find any XML parsers
BellowsParseException
- if XML parsing errors occur
BellowsIOException
- if I/O errors occurpublic static Datum fromXml(java.lang.String xml) throws UmberClassException, BellowsIOException, BellowsParseException
xml
- the input XML in String form
UmberClassException
- if unable to find any XML parsers
BellowsParseException
- if XML parsing errors occur
BellowsIOException
- if I/O errors occurpublic int read() throws java.io.IOException
java.io.IOException
- if an I/O error occurspublic int read(char[] buf, int offset, int length) throws java.io.IOException
java.io.IOException
public boolean markSupported()
public void close() throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |