public Object unmarshal(Reader pReader) throws JAXBException {
return unmarshal(new InputSource(pReader));
}
public Object unmarshal(InputSource pSource) throws JAXBException {
UnmarshallerHandler uh = getUnmarshallerHandler();
try {
SAXParser sp = spf.newSAXParser();
XMLReader xr = sp.getXMLReader();
xr.setContentHandler(uh);
xr.parse(pSource);
} catch (SAXException e) {
if (e.getException() != null) {
throw new UnmarshalException(e.getException());
} else {
throw new UnmarshalException(e);
}
} catch (IOException e) {
throw new UnmarshalException(e);
} catch (ParserConfigurationException e) {
throw new UnmarshalException(e);
}
return uh.getResult();
}