|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.myjavatools.xml.XmlReader
public class XmlReader
Nested Class Summary | |
---|---|
protected class |
XmlReader.Handler
|
protected static interface |
XmlReader.ParserFactory
|
protected static class |
XmlReader.SAX1ParserFactory
|
protected static class |
XmlReader.SAX2ParserFactory
|
Field Summary | |
---|---|
protected BasicXmlData |
curElement
|
protected static XmlReader.ParserFactory |
factory
|
protected XmlReader.Handler |
handler
|
protected BasicXmlData |
lastElement
|
protected static XmlReader.ParserFactory[] |
parserPlant
|
protected static org.xml.sax.Parser |
SAX_parser
|
protected org.xml.sax.InputSource |
src
|
Constructor Summary | |
---|---|
XmlReader(java.io.File file)
Creates an XmlReader to read from a file. |
|
XmlReader(java.io.InputStream in)
Creates an XmlReader from an input stream. |
|
XmlReader(java.io.Reader in)
Creates an XmlReader from a Reader |
|
XmlReader(java.lang.String filename)
Creates an XmlReader to read from a file. |
Method Summary | |
---|---|
BasicXmlData |
read()
Reads the whole XML contents into XmlData |
static BasicXmlData |
read(java.io.File in)
Reads the whole XML contents into XmlData |
static BasicXmlData |
read(java.io.InputStream in)
Reads the whole XML contents into XmlData |
static BasicXmlData |
read(java.io.Reader in)
Reads the whole XML contents into XmlData |
static BasicXmlData |
readFromString(java.lang.String s)
Reads the whole XML contents into XmlData |
boolean |
ready()
Tells whether input is ready to be read. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static XmlReader.ParserFactory[] parserPlant
protected static XmlReader.ParserFactory factory
protected org.xml.sax.InputSource src
protected static org.xml.sax.Parser SAX_parser
protected BasicXmlData curElement
protected BasicXmlData lastElement
protected XmlReader.Handler handler
Constructor Detail |
---|
public XmlReader(java.io.Reader in) throws java.io.IOException, java.lang.InstantiationException
in
- the reader to read data from
java.io.IOException
java.lang.InstantiationException
public XmlReader(java.io.InputStream in) throws java.io.UnsupportedEncodingException, java.io.IOException, java.lang.InstantiationException
in
- the stream to read data from
java.io.UnsupportedEncodingException
java.io.IOException
java.lang.InstantiationException
public XmlReader(java.io.File file) throws java.io.UnsupportedEncodingException, java.io.IOException, java.lang.InstantiationException
file
- the file to read data from
java.io.UnsupportedEncodingException
java.io.IOException
java.lang.InstantiationException
public XmlReader(java.lang.String filename) throws java.io.UnsupportedEncodingException, java.io.IOException, java.lang.InstantiationException
filename
- the name of the file to read data from
java.io.UnsupportedEncodingException
java.io.IOException
java.lang.InstantiationException
Method Detail |
---|
public boolean ready() throws java.io.IOException
java.io.IOException
- if an I/O error occurs.public BasicXmlData read() throws java.io.IOException
java.io.IOException
- if an I/O error occurs.public static BasicXmlData read(java.io.InputStream in) throws java.io.IOException, java.lang.InstantiationException
in
- the stream to read data from
java.io.IOException
- if an I/O error occurs.
java.lang.InstantiationException
- if there are problems instantiating XmlDatapublic static BasicXmlData read(java.io.File in) throws java.io.IOException, java.lang.InstantiationException
in
- the file to read data from
java.io.IOException
- if an I/O error occurs.
java.lang.InstantiationException
- if there are problems instantiating XmlDatapublic static BasicXmlData read(java.io.Reader in) throws java.io.IOException, java.lang.InstantiationException
in
- the reader to read data from
java.io.IOException
- if an I/O error occurs.
java.lang.InstantiationException
- if there are problems instantiating XmlDatapublic static BasicXmlData readFromString(java.lang.String s) throws java.io.IOException, java.lang.InstantiationException
s
- the string containing the XmlData as text
java.io.IOException
- if an I/O error occurs.
java.lang.InstantiationException
- if there are problems instantiating XmlData
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |