|
||||||||||
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
Class DOMSerializer is a small 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()
Method creates a new DOMSerializer. |
static DOMSerializer |
createNew(DOMSerializerOptions options)
Method creates a new DOMSerializer. |
protected static javax.xml.transform.Transformer |
createTransformer(DOMSerializerOptions options)
Method creates a new copy Transformer. |
static org.w3c.dom.Document |
removeIndentTextNodes(org.w3c.dom.Document document)
Method removes the indent text nodes from the dom tree. |
void |
serialize(org.w3c.dom.Document document,
java.io.OutputStream out)
Method serializes the document to the output stream. |
void |
serialize(org.w3c.dom.Document document,
java.io.Writer out)
Method serializes the xml document to the writer. |
abstract void |
serialize(org.w3c.dom.Node node,
java.io.OutputStream out)
Method serializes the node to the output stream. |
abstract void |
serialize(org.w3c.dom.Node node,
java.io.Writer out)
Method serializes the xml node to the writer. |
byte[] |
serializeToBytes(org.w3c.dom.Document document)
Method serializeToBytes converts the document to a byte[]. |
byte[] |
serializeToBytes(org.w3c.dom.Node node)
Method serializeToBytes converts the node to a byte[]. |
java.lang.String |
serializeToString(org.w3c.dom.Document document)
Method serializeToString converts the document to a string. |
java.lang.String |
serializeToString(org.w3c.dom.Node node)
Method serializeToString 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)
options
- the options.
protected static javax.xml.transform.Transformer createTransformer(DOMSerializerOptions options) throws DOMSerializerException
options
- the options.
DOMSerializerException
- if the copy transformer can't be created.public static org.w3c.dom.Document removeIndentTextNodes(org.w3c.dom.Document document)
document
- the document.
public void serialize(org.w3c.dom.Document document, java.io.Writer out) throws DOMSerializerException
document
- the document.out
- the out.
DOMSerializerException
- if error occurs.public void serialize(org.w3c.dom.Document document, java.io.OutputStream out) throws DOMSerializerException
document
- the document.out
- the out.
DOMSerializerException
- if error occurs.public byte[] serializeToBytes(org.w3c.dom.Document document) throws DOMSerializerException
document
- the document.
DOMSerializerException
- if error occurs.public byte[] serializeToBytes(org.w3c.dom.Node node) throws DOMSerializerException
node
- the node.
DOMSerializerException
- if error occurs.public abstract void serialize(org.w3c.dom.Node node, java.io.OutputStream out) throws DOMSerializerException
node
- the dom node.out
- the out.
DOMSerializerException
- if error occurs.public java.lang.String serializeToString(org.w3c.dom.Document document) throws DOMSerializerException
document
- the document.
DOMSerializerException
- if error occurs.public java.lang.String serializeToString(org.w3c.dom.Node node) throws DOMSerializerException
node
- the node.
DOMSerializerException
- if error occurs.public abstract void serialize(org.w3c.dom.Node node, java.io.Writer out) throws DOMSerializerException
node
- the dom node.out
- the out.
DOMSerializerException
- if error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |