public abstract class OutputSerializer extends Serializer
| Modifier and Type | Method and Description |
|---|---|
void |
atomic(Item it)
Serializes an atomic value.
|
void |
attribute(byte[] n,
byte[] v)
Serializes an attribute.
|
void |
close()
Closes the serializer.
|
void |
closeResult()
Closes a result.
|
protected void |
code(int ch)
Encodes the specified character before printing it.
|
protected boolean |
ct(boolean empty,
boolean html)
Prints the content type declaration.
|
protected void |
doctype(byte[] dt)
Prints the document type declaration.
|
protected void |
finishClose()
Closes an element.
|
void |
finishComment(byte[] n)
Serializes a comment.
|
boolean |
finished()
Tests if the serialization was interrupted.
|
protected void |
finishEmpty()
Closes an empty element.
|
protected void |
finishOpen()
Finishes an opening element node.
|
void |
finishPi(byte[] n,
byte[] v)
Serializes a processing instruction.
|
void |
finishText(byte[] b)
Serializes a text.
|
void |
finishText(byte[] b,
FTPos ftp)
Serializes a text.
|
protected void |
hex(int ch)
Returns a hex entity for the specified character.
|
protected void |
indent()
Indents the next text.
|
void |
openDoc(byte[] n)
Opens a document.
|
void |
openResult()
Starts a result.
|
protected void |
print(byte[] token)
Writes a token in the current encoding.
|
protected void |
print(int ch)
Writes a character in the current encoding.
|
protected void |
print(java.lang.String s)
Writes a string in the current encoding.
|
protected void |
printChar(int ch)
Writes a character in the current encoding.
|
void |
reset()
Resets the serializer (indentation, etc).
|
protected void |
startOpen(byte[] t)
Starts an element.
|
closeDoc, closeElement, get, get, namespace, serialize, serialize, startElementpublic final void reset()
Serializerreset in class Serializerpublic void close()
throws java.io.IOException
Serializerclose in class Serializerjava.io.IOException - I/O exceptionpublic void openResult()
throws java.io.IOException
SerializeropenResult in class Serializerjava.io.IOException - I/O exceptionpublic void closeResult()
throws java.io.IOException
SerializercloseResult in class Serializerjava.io.IOException - I/O exceptionpublic void attribute(byte[] n,
byte[] v)
throws java.io.IOException
Serializerattribute in class Serializern - namev - valuejava.io.IOException - I/O exceptionpublic void finishText(byte[] b)
throws java.io.IOException
SerializerfinishText in class Serializerb - valuejava.io.IOException - I/O exceptionpublic void finishText(byte[] b,
FTPos ftp)
throws java.io.IOException
SerializerfinishText in class Serializerb - valueftp - full-text positions, used for visualization highlightingjava.io.IOException - I/O exceptionpublic void finishComment(byte[] n)
throws java.io.IOException
SerializerfinishComment in class Serializern - valuejava.io.IOException - I/O exceptionpublic void finishPi(byte[] n,
byte[] v)
throws java.io.IOException
SerializerfinishPi in class Serializern - namev - valuejava.io.IOException - I/O exceptionpublic void atomic(Item it) throws java.io.IOException
Serializeratomic in class Serializerit - itemjava.io.IOException - I/O exceptionpublic void openDoc(byte[] n)
throws java.io.IOException
SerializeropenDoc in class Serializern - namejava.io.IOException - I/O exceptionpublic final boolean finished()
Serializerfinished in class Serializerprotected void startOpen(byte[] t)
throws java.io.IOException
SerializerstartOpen in class Serializert - tag namejava.io.IOException - I/O exceptionprotected void finishOpen()
throws java.io.IOException
SerializerfinishOpen in class Serializerjava.io.IOException - I/O exceptionprotected void finishEmpty()
throws java.io.IOException
SerializerfinishEmpty in class Serializerjava.io.IOException - I/O exceptionprotected void finishClose()
throws java.io.IOException
SerializerfinishClose in class Serializerjava.io.IOException - I/O exceptionprotected void code(int ch)
throws java.io.IOException
ch - character to be encoded and printedjava.io.IOException - I/O exceptionprotected void doctype(byte[] dt)
throws java.io.IOException
dt - document type, or null for html typejava.io.IOException - I/O exceptionprotected final void indent()
throws java.io.IOException
java.io.IOException - I/O exceptionprotected final void hex(int ch)
throws java.io.IOException
ch - characterjava.io.IOException - I/O exceptionprotected final void printChar(int ch)
throws java.io.IOException
ch - character to be printedjava.io.IOException - I/O exceptionprotected void print(int ch)
throws java.io.IOException
ch - character to be printedjava.io.IOException - I/O exceptionprotected final void print(byte[] token)
throws java.io.IOException
token - token to be printedjava.io.IOException - I/O exceptionprotected final void print(java.lang.String s)
throws java.io.IOException
s - string to be printedjava.io.IOException - I/O exceptionprotected boolean ct(boolean empty,
boolean html)
throws java.io.IOException
empty - empty flaghtml - methodtrue if declaration was printedjava.io.IOException - I/O exception