|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The Serializer interface is implemented by Serializers to publish methods to get and set streams and writers, to set the output properties, and get the Serializer as a ContentHandler or DOMSerializer.
Method Summary | |
org.xml.sax.ContentHandler |
asContentHandler()
Return a ContentHandler interface into this serializer.
|
DOMSerializer |
asDOMSerializer()
Return a DOMSerializer interface into this serializer.
|
Properties |
getOutputFormat()
Returns the output format for this serializer. |
OutputStream |
getOutputStream()
Get the output stream where the events will be serialized to. |
Writer |
getWriter()
Get the character stream where the events will be serialized to. |
boolean |
reset()
Resets the serializer. |
void |
setOutputFormat(Properties format)
Specifies an output format for this serializer. |
void |
setOutputStream(OutputStream output)
Specifies an output stream to which the document should be serialized. |
void |
setWriter(Writer writer)
Specifies a writer to which the document should be serialized. |
Method Detail |
public void setOutputStream(OutputStream output)
The encoding specified in the output Properties
is used, or
if no encoding was specified, the default for the selected
output method.
output
- The output streampublic OutputStream getOutputStream()
public void setWriter(Writer writer)
The encoding specified for the output Properties
must be
identical to the output format used with the writer.
writer
- The output writer streampublic Writer getWriter()
public void setOutputFormat(Properties format)
format
- The output format to usepublic Properties getOutputFormat()
public org.xml.sax.ContentHandler asContentHandler() throws IOException
ContentHandler
interface into this serializer.
If the serializer does not support the ContentHandler
interface, it should return null.
ContentHandler
interface into this serializer,
or null if the serializer is not SAX 2 capable
IOException
- An I/O exception occuredpublic DOMSerializer asDOMSerializer() throws IOException
DOMSerializer
interface into this serializer.
If the serializer does not support the DOMSerializer
interface, it should return null.
DOMSerializer
interface into this serializer,
or null if the serializer is not DOM capable
IOException
- An I/O exception occuredpublic boolean reset()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |