public class JAXBUnmarshallerHandler extends SAXDocumentBuilder implements UnmarshallerHandler
Implementation of UnmarshallerHandler to be used by JAXBUnmarshaller.
JAXBUnmarshaller
,
UnmarshallerHandler
document, locator, namespaceDeclarations, nodes, stringBuffer, xmlPlatform
Constructor and Description |
---|
JAXBUnmarshallerHandler(JAXBUnmarshaller newXMLUnmarshaller)
Create a new JAXBUnmarshallerHandler with the specified JAXBUnmarshaller
|
Modifier and Type | Method and Description |
---|---|
void |
endDocument()
Event that is called at the end of processing the document.
|
java.lang.Object |
getResult()
Return the unmarhalled document.
|
void |
startDocument()
Event that is called at the start of processing the document.
|
addNamespaceDeclaration, appendChildNode, characters, characters, endElement, endPrefixMapping, getDocument, getInitializedDocument, ignorableWhitespace, processingInstruction, setDocumentLocator, setNil, skippedEntity, startElement, startPrefixMapping
public JAXBUnmarshallerHandler(JAXBUnmarshaller newXMLUnmarshaller)
newXMLUnmarshaller
- the JAXBUnmarshaller.public void endDocument() throws org.xml.sax.SAXException
endDocument
in interface org.xml.sax.ContentHandler
endDocument
in class SAXDocumentBuilder
org.xml.sax.SAXException
public void startDocument() throws org.xml.sax.SAXException
startDocument
in interface org.xml.sax.ContentHandler
startDocument
in class SAXDocumentBuilder
org.xml.sax.SAXException
public java.lang.Object getResult() throws JAXBException, java.lang.IllegalStateException
getResult
in interface UnmarshallerHandler
JAXBException
- if there is any unmarshalling error.
Note that the implementation is allowed to throw SAXException
during the parsing when it finds an error.java.lang.IllegalStateException
- if this method is called before this handler
receives the endDocument event.