javax.xml.bind
public interface UnmarshallerHandler extends ContentHandler
This interface is the SAX org.xml.sax.ContentHandler representation of an Unmarshaller, as returned by getUnmarshallerHandler. It can be embedded into a stack of SAX handlers, for example within Apache Cocoon.
The UnmarshallerHandler
is reusable: The
startDocument()
method is expected to perform
a reinitialization. Like most other SAX handlers, the
UnmarshallerHandler
is never thread safe.
Since: JAXB1.0
Method Summary | |
---|---|
Object | getResult() Returns the unmarshalled object. |
Returns the unmarshalled object. This method may be invoked
after an endDocument()
event only. An
IllegalStateException is thrown otherwise.
Returns: The unmarshalled object, never null. (An IllegalStateException is thrown, if no data is available.
Throws: JAXBException An error occurred. Note, that the
UnmarshallerHandler throws a
org.xml.sax.SAXException if an error occurs while
unmarshalling the object. In such cases the
JAXBException is typically nested within the
org.xml.sax.SAXException. IllegalStateException An endDocument()
event has not yet been seen and no data is available.