public interface UnmarshallerHandler
extends org.xml.sax.ContentHandler
This interface is the SAX ContentHandler
representation of an Unmarshaller, as
returned by
Unmarshaller.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.
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getResult()
Returns the unmarshalled object.
|
java.lang.Object getResult()
throws JAXBException,
java.lang.IllegalStateException
Returns the unmarshalled object. This method may be invoked
after an endDocument() event only. An
IllegalStateException is thrown otherwise.
IllegalStateException is thrown, if no data is
available.JAXBException - An error occurred. Note, that the
UnmarshallerHandler throws a
SAXException if an error occurs while
unmarshalling the object. In such cases the
JAXBException is typically nested within the
SAXException.java.lang.IllegalStateException - An endDocument()
event has not yet been seen and no data is available.