|
Enhydra 3.0.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enhydra.xml.io.DOMFormatter
Class for formatting DOMs into a documents. The class handles XML and HTML pages, looking up the approriate formatting routines based on the document type. It has an associated OutputOptions object that controls the formatting. Instances are reusable and multithreaded.
Constructor Summary | |
DOMFormatter()
Construct a new XML formatter with default output options. |
|
DOMFormatter(OutputOptions outputOptions)
Construct a new XML formatter with the specified output options. |
Method Summary | |
OutputOptions |
getOutputOptions()
Get the output options. |
void |
setOutputOptions(OutputOptions outputOptions)
Set the output options. |
byte[] |
toBytes(Node node)
Format a document or any node and its children into a byte array using the current encoding. |
java.lang.String |
toString(Node node)
Format a document or any node and its children into a string. |
void |
write(Node node,
java.io.File out)
Output a document or any node and its children to a File. |
void |
write(Node node,
java.io.OutputStream out)
Output a document or any node and its children to a OutputStream. |
void |
write(Node node,
java.io.Writer writer)
Output a document or any node and its children to a Writer. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public DOMFormatter(OutputOptions outputOptions)
outputOptions
- The OutputOptions object thatpublic DOMFormatter()
Method Detail |
public OutputOptions getOutputOptions()
public void setOutputOptions(OutputOptions outputOptions)
public java.lang.String toString(Node node)
public byte[] toBytes(Node node) throws java.io.IOException
public void write(Node node, java.io.Writer writer) throws java.io.IOException
public void write(Node node, java.io.OutputStream out) throws java.io.IOException
public void write(Node node, java.io.File out) throws java.io.IOException
|
Enhydra 3.0.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |