Method Summary |
|
public void | close() Ends document writting, closes this writer and its underlying
output then
XMLObjectWriter.reset reset this Writer for potential reuse. |
public void | flush() Flushes the output stream of this writer (automatically done
when
XMLObjectWriter.close() closing ). |
public XMLStreamWriter | getStreamWriter() Returns the stream writer used by this object writer (it can be used
to write prolog, write namespaces, etc). |
public static XMLObjectWriter | newInstance(OutputStream out) Returns a XML object writer (potentially recycled) having the specified
output stream as output. |
public static XMLObjectWriter | newInstance(OutputStream out, String encoding) Returns a XML object writer (potentially recycled) having the specified
output stream/encoding as output. |
public static XMLObjectWriter | newInstance(Writer out) Returns a XML object writer (potentially recycled) having the specified
writer as output. |
public void | reset() Resets this object writer for reuse. |
public XMLObjectWriter | setBinding(XMLBinding binding) Sets the XML binding to use with this object writer.
Parameters: binding - the XML binding to use. |
public XMLObjectWriter | setIndentation(String indentation) Sets the indentation to be used by this writer (no indentation
by default).
Parameters: indentation - the indentation string. |
public XMLObjectWriter | setOutput(OutputStream out) Sets the output stream for this XML object writer.
Parameters: out - the output stream destination. |
public XMLObjectWriter | setOutput(OutputStream out, String encoding) Sets the output stream and encoding for this XML object writer.
Parameters: out - the output stream destination. Parameters: encoding - the stream encoding. |
public XMLObjectWriter | setOutput(Writer out) Sets the output writer for this XML object writer.
Parameters: out - the writer destination. |
public XMLObjectWriter | setReferenceResolver(XMLReferenceResolver referenceResolver) Sets the XML reference resolver to use with this object writer
(the same reference resolver can be used accross multiple writers).
Parameters: referenceResolver - the XML reference resolver. |
public void | write(Object obj) Writes the specified object as an anonymous nested element of
unknown type. |
public void | write(Object obj, String name) Writes the specified object as a named nested element of unknown type
(null objects are ignored). |
public void | write(Object obj, String localName, String uri) Writes the specified object as a fully qualified nested element of
unknown type (null objects are ignored). |
public void | write(Object obj, String name, Class cls) Writes the specified object as a named nested element of actual type
known (null objects are ignored). |
public void | write(Object obj, String localName, String uri, Class cls) Writes the specified object as a fully qualified nested element of
actual type known (null objects are ignored). |