public class Unmarshaller<T> extends Object
unmarshal method takes a different source for the XML. This
class caches information to improve unmarshaling performance across calls
using the same schema (package).| Constructor and Description |
|---|
Unmarshaller(String contextPath,
ClassLoader classloader)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ClassLoader |
getClassLoader()
Returns the JAXB classloader.
|
String |
getContextPath()
Returns the JAXB context path.
|
void |
setEventHandler(javax.xml.bind.ValidationEventHandler handler)
Sets the validation handler for this unmarshaller.
|
Object |
unmarshal(JaxbRepresentation<?> jaxbRep)
Unmarshal XML data from the specified Restlet string representation and
return the resulting Java content tree.
|
Object |
unmarshal(JaxbRepresentation<?> jaxbRep,
InputStream stream)
Unmarshal XML data from the specified input stream and return the
resulting Java content tree.
|
Object |
unmarshal(JaxbRepresentation<?> jaxbRep,
Reader reader)
Unmarshal XML data from the specified reader and return the resulting
Java content tree.
|
public Unmarshaller(String contextPath, ClassLoader classloader)
contextPath - The JAXB context path.classloader - The JAXB classloader.public ClassLoader getClassLoader()
public String getContextPath()
public void setEventHandler(javax.xml.bind.ValidationEventHandler handler) throws javax.xml.bind.JAXBException
handler - A validation handler.javax.xml.bind.JAXBException - If an error was encountered while setting the event handler.public Object unmarshal(JaxbRepresentation<?> jaxbRep, InputStream stream) throws javax.xml.bind.JAXBException
stream - The source input stream.javax.xml.bind.JAXBException - If any unexpected problem occurs during unmarshaling.IOException - If an error occurs accessing the string representation.public Object unmarshal(JaxbRepresentation<?> jaxbRep, Reader reader) throws javax.xml.bind.JAXBException
reader - The source reader.javax.xml.bind.JAXBException - If any unexpected problem occurs during unmarshaling.IOException - If an error occurs accessing the string representation.public Object unmarshal(JaxbRepresentation<?> jaxbRep) throws javax.xml.bind.JAXBException, IOException
jaxbRep - The source JAXB representation.javax.xml.bind.JAXBException - If any unexpected problem occurs during unmarshaling.IOException - If an error occurs accessing the string representation.Copyright © 2005–2015. All rights reserved.