public abstract class BaseMarshaller extends Object implements Marshaller
Marshaller.Listener
Modifier and Type | Field and Description |
---|---|
protected String |
charset |
protected Marshaller |
marshaller |
JAXB_ENCODING, JAXB_FORMATTED_OUTPUT, JAXB_FRAGMENT, JAXB_NO_NAMESPACE_SCHEMA_LOCATION, JAXB_SCHEMA_LOCATION
Constructor and Description |
---|
BaseMarshaller() |
Modifier and Type | Method and Description |
---|---|
void |
marshal(Object o,
OutputStream outputStream)
Marshal the content tree rooted at
jaxbElement into an output stream. |
void |
setProperty(String s,
Object o)
Set the particular property in the underlying implementation of
Marshaller . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAdapter, getAttachmentMarshaller, getEventHandler, getListener, getNode, getProperty, getSchema, marshal, marshal, marshal, marshal, marshal, marshal, marshal, setAdapter, setAdapter, setAttachmentMarshaller, setEventHandler, setListener, setSchema
protected Marshaller marshaller
protected String charset
public void marshal(Object o, OutputStream outputStream) throws JAXBException
Marshaller
jaxbElement
into an output stream.marshal
in interface Marshaller
o
- The root of content tree to be marshalled.outputStream
- XML will be added to this stream.JAXBException
- If any unexpected problem occurs during the marshalling.MarshalException
- If the ValidationEventHandler
returns false from its handleEvent
method or the
Marshaller
is unable to marshal jaxbElement
(or any
object reachable from jaxbElement
). See
Marshalling a JAXB element.public void setProperty(String s, Object o) throws PropertyException
Marshaller
Marshaller
. This method can only be used to set one of
the standard JAXB defined properties above or a provider specific
property. Attempting to set an undefined property will result in
a PropertyException being thrown. See
Supported Properties.setProperty
in interface Marshaller
s
- the name of the property to be set. This value can either
be specified using one of the constant fields or a user
supplied string.o
- the value of the property to be setPropertyException
- when there is an error processing the given
property or valueCopyright © 2021 JBoss by Red Hat. All rights reserved.