public class ConfigurationUnMarshallerException extends DRException
| Constructor and Description |
|---|
ConfigurationUnMarshallerException(InputStream is)
Constructs a ConfigurationUnMarshallerException using the inputStream from which we are reading configurations when the exceptional event occurs.
|
ConfigurationUnMarshallerException(String message) |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic ConfigurationUnMarshallerException(InputStream is)
try {
Unmarshaller unmarshaller = JAXBContext.newInstance(XmlAdhocConfiguration.class).createUnmarshaller();
JAXBElement<XmlAdhocConfiguration> element = unmarshaller.unmarshal(new StreamSource(is), XmlAdhocConfiguration.class);
XmlAdhocConfiguration xmlAdhocConfiguration = element.getValue();
AdhocConfiguration adhocConfiguration = xmlToAdhocTransform.transform(xmlAdhocConfiguration);
return adhocConfiguration;
} catch (JAXBException e) {
// time to throw our exception
throw new ConfigurationUnMarshallerException(is);
}
is - The InputStream from which we are reading configuration datapublic ConfigurationUnMarshallerException(String message)
Copyright © 2010–2021. All rights reserved.