Package org.dellroad.stuff.jibx
Class XMLDocumentOutputStream<T>
java.lang.Object
org.dellroad.stuff.jibx.XMLDocumentOutputStream<T>
- Type Parameters:
T- XML document type
OutputStream over which XML documents are passed. This class is a companion to XMLDocumentInputStream.
XML documents are created from Java objects via JiBXUtil.writeObject().
Instances of this class are thread-safe.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
XMLDocumentOutputStream
Constructor.- Parameters:
output- data destination
-
-
Method Details
-
write
Write the object encoded as XML to the underlying output stream. The underlying output stream is flushed.- Parameters:
obj- object to write- Throws:
IOException- if an I/O error occursJiBXException- if JiBX encoding fails
-
close
Close the underlying output stream.- Throws:
IOException- if an I/O error occurs
-