|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.util.xml.XIO
public class XIO
Class used to read and write xml-files. Clients should use
writeUTF(XElement, OutputStream) and readUTF(InputStream) to
guarantee maximal independence from the underlying file system.
| Constructor Summary | |
|---|---|
XIO()
|
|
| Method Summary | |
|---|---|
static XElement |
read(java.lang.CharSequence text)
Interprets text as a xml-file and reads it. |
static XElement |
read(org.xml.sax.InputSource source)
Reads a xml-file from source. |
static XElement |
read(java.io.InputStream in,
java.lang.String encoding)
Reads a xml file provided from in using encoding
as encoding. |
static XElement |
read(java.io.Reader reader)
Reads a xml file provided from reader. |
static XElement |
readUTF(java.io.InputStream in)
Reads a xml file provided from in using UTF-8
as encoding. |
static void |
write(XElement element,
java.lang.Appendable out)
Writes the contents of element into out. |
static void |
write(XElement element,
java.io.OutputStream out,
java.lang.String encoding)
Writes the contents of element into out. |
static void |
writeUTF(XElement element,
java.io.OutputStream out)
Writes the contents of element into out using
the UTF-8 encoding. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XIO()
| Method Detail |
|---|
public static void write(XElement element,
java.lang.Appendable out)
throws java.io.IOException
element into out.
element - the element to writeout - the stream to write into
java.io.IOException - if an I/O-error occurs
public static void writeUTF(XElement element,
java.io.OutputStream out)
throws java.io.IOException
element into out using
the UTF-8 encoding.
element - the element to writeout - the stream to write into
java.io.IOException - if an I/O-error occurs
public static void write(XElement element,
java.io.OutputStream out,
java.lang.String encoding)
throws java.io.IOException
element into out.
element - the element to writeout - the stream to write intoencoding - the encoding for the characters
java.io.IOException - if an I/O-error occurs
public static XElement readUTF(java.io.InputStream in)
throws java.io.IOException
in using UTF-8
as encoding.
in - the stream to read from
java.io.IOException - if an I/O-error occurs
public static XElement read(java.io.InputStream in,
java.lang.String encoding)
throws java.io.IOException
in using encoding
as encoding.
in - the stream to read fromencoding - the encoding used to decode characters
java.io.IOException - if an I/O-error occurs
public static XElement read(java.lang.CharSequence text)
throws java.io.IOException
text as a xml-file and reads it.
text - the content to read, in xml format
text
java.io.IOException - if an I/O-error occurs
public static XElement read(org.xml.sax.InputSource source)
throws java.io.IOException
source.
source - the xml-file
java.io.IOException - if an I/O-error occurs
public static XElement read(java.io.Reader reader)
throws java.io.IOException
reader.
reader - the reader from which characters will be read
java.io.IOException - if an I/O-error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||