|
||||||||||
| 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 exception
public 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 exception| Method Detail |
|---|
public void encoding(String e)
throws IOException
e - encoding
IOException - I/O exception
public void doctype(byte[] t,
byte[] te,
byte[] ti)
throws IOException
t - document root element tagte - external subsetti - internal subset
IOException - IOException
public void cls()
throws IOException
Serializer
IOException - I/O exception
public void openResult()
throws IOException
Serializer
openResult in class SerializerIOException - I/O exception
public void closeResult()
throws IOException
Serializer
closeResult in class SerializerIOException - I/O exception
public void attribute(byte[] n,
byte[] v)
throws IOException
Serializer
attribute in class Serializern - namev - value
IOException - I/O exception
public void text(byte[] b)
throws IOException
Serializer
text in class Serializerb - text bytes
IOException - I/O exception
public void text(byte[] b,
FTPos ftp)
throws IOException
Serializer
text in class Serializerb - text bytesftp - full-text positions
IOException - I/O exception
public void comment(byte[] n)
throws IOException
Serializer
comment in class Serializern - comment
IOException - I/O exception
public void pi(byte[] n,
byte[] v)
throws IOException
Serializer
pi in class Serializern - namev - value
IOException - I/O exception
public void item(byte[] b)
throws IOException
Serializer
item in class Serializerb - 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 | |||||||||