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(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(ValidationEventHandler handler) throws JAXBException
handler
- A validation handler.JAXBException
- If an error was encountered while setting the event handler.public Object unmarshal(JaxbRepresentation<?> jaxbRep) throws JAXBException, IOException
jaxbRep
- The source JAXB representation.JAXBException
- If any unexpected problem occurs during unmarshaling.IOException
- If an error occurs accessing the string representation.public Object unmarshal(JaxbRepresentation<?> jaxbRep, InputStream stream) throws JAXBException
stream
- The source input stream.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 JAXBException
reader
- The source reader.JAXBException
- If any unexpected problem occurs during unmarshaling.IOException
- If an error occurs accessing the string representation.Copyright © 2005–2018. All rights reserved.