public class ConfigurationMarshallerException extends DRException
JAXBElement
containing and XmlAdhocConfiguration
into the output stream provided. This exception may arise in
situations such as the one shown below:
try {
Marshaller marshaller = JAXBContext.newInstance(XmlAdhocConfiguration.class).createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
element = new net.sf.dynamicreports.adhoc.xmlconfiguration.ObjectFactory().createConfiguration(xmlAdhocConfiguration);
marshaller.marshal(element, new StreamResult(outputStream));
} catch (JAXBException e) {
throw new ConfigurationMarshallerException(element, outputStream);
}
The constructor only accepts two parameters being the JAXBElement
that was being marshalled and the OutputStream
into which we are marshalling the element.Constructor and Description |
---|
ConfigurationMarshallerException(JAXBElement<XmlAdhocConfiguration> element,
OutputStream outputStream)
Creates a DRException when the client encounters an exceptional event while marshalling an element into an assigned outputStream
|
ConfigurationMarshallerException(String message)
Constructor for DRException.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public ConfigurationMarshallerException(JAXBElement<XmlAdhocConfiguration> element, OutputStream outputStream)
element
- The element being marshalled into XML when exception is encounteredoutputStream
- The output stream into which we are marshalling the elementCopyright © 2010–2021. All rights reserved.