javax.xml.bind
Interface UnmarshallerHandler
- ContentHandler
- JMUnmarshallerHandler
- JMUnmarshallerHandlerImpl
public interface UnmarshallerHandler
extends ContentHandler
This interface is the SAX
org.xml.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.
Object | getResult() - Returns the unmarshalled object.
|
getResult
public Object getResult()
throws JAXBException,
IllegalStateException
Returns the unmarshalled object. This method may be invoked
after an endDocument()
event only. An
IllegalStateException
is thrown otherwise.
- The unmarshalled object, never null. (An
IllegalStateException
is thrown, if no data is
available.
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
.