Package org.dellroad.stuff.jibx
Class XMLDocumentInputStream<T>
java.lang.Object
org.dellroad.stuff.jibx.XMLDocumentInputStream<T>
- Type Parameters:
T
- XML document type
InputStream
over which XML documents are passed. This class is a companion to XMLDocumentOutputStream
.
XML documents are converted into Java objects via JiBXUtil.readObject()
.
Instances of this class are thread-safe.
- See Also:
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
XMLDocumentInputStream
Constructor.- Parameters:
type
- Java type for XML documentsinput
- data source
-
-
Method Details
-
read
Read the next XML document, parsed and objectified.- Returns:
- decoded object or
null
on EOF - Throws:
IOException
- if an I/O error occursJiBXException
- if JiBX parse fails
-
close
- Throws:
IOException
-