|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.n52.security.common.xml.DOMSerializer
public abstract class DOMSerializer
Utility calls responsible for serializing xml documents to output streams.
Usage: Use DOMSerializer.createNew() to create a new instance of a DOMSerializier and then use one of the serialize methods. A DOMSerializer shall be never hold as member variable, please create them only local.
Constructor Summary | |
---|---|
DOMSerializer()
|
Method Summary | |
---|---|
static DOMSerializer |
createNew()
|
static DOMSerializer |
createNew(DOMSerializerOptions options)
|
protected static Transformer |
createTransformer(DOMSerializerOptions options)
Creates a new copy Transformer. |
static Document |
removeIndentTextNodes(Document document)
Removes the indent text nodes from the dom tree. |
void |
serialize(Document document,
OutputStream out)
Serializes the document to the output stream. |
void |
serialize(Document document,
Writer out)
Serializes the xml document to the writer. |
abstract void |
serialize(Node node,
OutputStream out)
Serializes the node to the output stream. |
abstract void |
serialize(Node node,
Writer out)
Serializes the xml node to the writer. |
byte[] |
serializeToBytes(Document document)
Converts the document to a byte[]. |
byte[] |
serializeToBytes(Node node)
Converts the node to a byte[]. |
String |
serializeToString(Document document)
Converts the document to a String. |
String |
serializeToString(Node node)
Converts the node to a String. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DOMSerializer()
Method Detail |
---|
public static DOMSerializer createNew()
public static DOMSerializer createNew(DOMSerializerOptions options)
protected static Transformer createTransformer(DOMSerializerOptions options) throws DOMSerializerException
options
- the options.
DOMSerializerException
- if the copy transformer can't be created.public static Document removeIndentTextNodes(Document document)
document
- the document.
public void serialize(Document document, Writer out) throws DOMSerializerException
DOMSerializerException
- if error occurs.public void serialize(Document document, OutputStream out) throws DOMSerializerException
DOMSerializerException
- if error occurs.public byte[] serializeToBytes(Document document) throws DOMSerializerException
DOMSerializerException
- if error occurs.public byte[] serializeToBytes(Node node) throws DOMSerializerException
DOMSerializerException
- if error occurs.public abstract void serialize(Node node, OutputStream out) throws DOMSerializerException
DOMSerializerException
- if error occurs.public String serializeToString(Document document) throws DOMSerializerException
DOMSerializerException
- if error occurs.public String serializeToString(Node node) throws DOMSerializerException
DOMSerializerException
- if error occurs.public abstract void serialize(Node node, Writer out) throws DOMSerializerException
DOMSerializerException
- if error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |