|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.data.Serializer
org.basex.data.XMLSerializer
public final class XMLSerializer
This class serializes XML results.
Field Summary |
---|
Fields inherited from class org.basex.data.Serializer |
---|
dn, ns |
Constructor Summary | |
---|---|
XMLSerializer(OutputStream o)
Constructor. |
|
XMLSerializer(OutputStream o,
boolean x,
boolean p)
Constructor. |
Method Summary | |
---|---|
void |
attribute(byte[] n,
byte[] v)
Serializes an attribute. |
void |
closeResult()
Closes a result. |
void |
cls()
Closes the serializer. |
void |
comment(byte[] n)
Serializes a comment. |
void |
doctype(byte[] t,
byte[] te,
byte[] ti)
Doctype declaration. |
void |
encoding(String e)
Sets the encoding and prints a document declaration. |
boolean |
finished()
Tests if the serialization was interrupted. |
void |
item(byte[] b)
Serializes an item. |
void |
openResult()
Starts a result. |
void |
pi(byte[] n,
byte[] v)
Serializes a processing instruction. |
void |
text(byte[] b)
Serializes a text. |
void |
text(byte[] b,
FTPos ftp)
Serializes a text. |
Methods inherited from class org.basex.data.Serializer |
---|
close, closeElement, emptyElement, emptyElement, level, namespace, node, node, openElement, openElement |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLSerializer(OutputStream o) throws IOException
o
- output stream reference
IOException
- I/O exceptionpublic XMLSerializer(OutputStream o, boolean x, boolean p) throws IOException
o
- output stream referencex
- serialize result as well-formed xmlp
- pretty print the result
IOException
- I/O exceptionMethod Detail |
---|
public void encoding(String e) throws IOException
e
- encoding
IOException
- I/O exceptionpublic void doctype(byte[] t, byte[] te, byte[] ti) throws IOException
t
- document root element tagte
- external subsetti
- internal subset
IOException
- IOExceptionpublic void cls() throws IOException
Serializer
IOException
- I/O exceptionpublic void openResult() throws IOException
Serializer
openResult
in class Serializer
IOException
- I/O exceptionpublic void closeResult() throws IOException
Serializer
closeResult
in class Serializer
IOException
- I/O exceptionpublic void attribute(byte[] n, byte[] v) throws IOException
Serializer
attribute
in class Serializer
n
- namev
- value
IOException
- I/O exceptionpublic void text(byte[] b) throws IOException
Serializer
text
in class Serializer
b
- text bytes
IOException
- I/O exceptionpublic void text(byte[] b, FTPos ftp) throws IOException
Serializer
text
in class Serializer
b
- text bytesftp
- full-text positions
IOException
- I/O exceptionpublic void comment(byte[] n) throws IOException
Serializer
comment
in class Serializer
n
- comment
IOException
- I/O exceptionpublic void pi(byte[] n, byte[] v) throws IOException
Serializer
pi
in class Serializer
n
- namev
- value
IOException
- I/O exceptionpublic void item(byte[] b) throws IOException
Serializer
item
in class Serializer
b
- text bytes
IOException
- I/O exceptionpublic boolean finished()
Serializer
finished
in class Serializer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |