|
||||||||||
| 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(CharSequence text)
Interprets text as a xml-file and reads it. |
static XElement |
read(InputSource source)
Reads a xml-file from source. |
static XElement |
read(InputStream in,
String encoding)
Reads a xml file provided from in using encoding
as encoding. |
static XElement |
read(Reader reader)
Reads a xml file provided from reader. |
static XElement |
readUTF(InputStream in)
Reads a xml file provided from in using UTF-8
as encoding. |
static void |
write(XElement element,
Appendable out)
Writes the contents of element into out. |
static void |
write(XElement element,
OutputStream out,
String encoding)
Writes the contents of element into out. |
static void |
writeUTF(XElement element,
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,
Appendable out)
throws IOException
element into out.
element - the element to writeout - the stream to write into
IOException - if an I/O-error occurs
public static void writeUTF(XElement element,
OutputStream out)
throws IOException
element into out using
the UTF-8 encoding.
element - the element to writeout - the stream to write into
IOException - if an I/O-error occurs
public static void write(XElement element,
OutputStream out,
String encoding)
throws IOException
element into out.
element - the element to writeout - the stream to write intoencoding - the encoding for the characters
IOException - if an I/O-error occurs
public static XElement readUTF(InputStream in)
throws IOException
in using UTF-8
as encoding.
in - the stream to read from
IOException - if an I/O-error occurs
public static XElement read(InputStream in,
String encoding)
throws IOException
in using encoding
as encoding.
in - the stream to read fromencoding - the encoding used to decode characters
IOException - if an I/O-error occurs
public static XElement read(CharSequence text)
throws IOException
text as a xml-file and reads it.
text - the content to read, in xml format
text
IOException - if an I/O-error occurs
public static XElement read(InputSource source)
throws IOException
source.
source - the xml-file
IOException - if an I/O-error occurs
public static XElement read(Reader reader)
throws IOException
reader.
reader - the reader from which characters will be read
IOException - if an I/O-error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||