public final class MarshallerImpl extends AbstractMarshallerImpl implements ValidationEventHandler
Marshaller interface for the JAXB RI.
Eventually all the marshal(java.lang.Object, java.io.OutputStream, javax.xml.namespace.NamespaceContext) methods call into
the write(com.sun.xml.bind.v2.runtime.Name, com.sun.xml.bind.v2.runtime.JaxBeanInfo<T>, T, com.sun.xml.bind.v2.runtime.output.XmlOutput, java.lang.Runnable) method.
Marshaller.Listener| Modifier and Type | Field and Description |
|---|---|
protected static String |
C14N |
protected static String |
ENCODING_HANDLER |
protected static String |
ENCODING_HANDLER2 |
protected static String |
INDENT_STRING |
protected static String |
OBJECT_IDENTITY_CYCLE_DETECTION |
protected static String |
PREFIX_MAPPER |
protected XMLSerializer |
serializer |
protected static String |
XML_HEADERS |
protected static String |
XMLDECLARATION |
JAXB_ENCODING, JAXB_FORMATTED_OUTPUT, JAXB_FRAGMENT, JAXB_NO_NAMESPACE_SCHEMA_LOCATION, JAXB_SCHEMA_LOCATION| Constructor and Description |
|---|
MarshallerImpl(JAXBContextImpl c,
AssociationMap assoc) |
getEncoding, getEventHandler, getJavaEncoding, getNode, getNoNSSchemaLocation, getSchemaLocation, isFormattedOutput, isFragment, marshal, marshal, marshal, marshal, marshal, setAdapter, setEncoding, setEventHandler, setFormattedOutput, setFragment, setNoNSSchemaLocation, setSchemaLocationprotected final XMLSerializer serializer
protected static final String INDENT_STRING
protected static final String PREFIX_MAPPER
protected static final String ENCODING_HANDLER
protected static final String ENCODING_HANDLER2
protected static final String XMLDECLARATION
protected static final String XML_HEADERS
protected static final String C14N
protected static final String OBJECT_IDENTITY_CYCLE_DETECTION
public MarshallerImpl(JAXBContextImpl c, AssociationMap assoc)
assoc - non-null if the marshaller is working inside BinderImpl.public JAXBContextImpl getContext()
public void marshal(Object obj, OutputStream out, NamespaceContext inscopeNamespace) throws JAXBException
OutputStream with the given in-scope namespaces
taken into account.JAXBExceptionpublic void marshal(Object obj, XMLStreamWriter writer) throws JAXBException
marshal in interface Marshallermarshal in class AbstractMarshallerImplJAXBExceptionpublic void marshal(Object obj, XMLEventWriter writer) throws JAXBException
marshal in interface Marshallermarshal in class AbstractMarshallerImplJAXBExceptionpublic void marshal(Object obj, XmlOutput output) throws JAXBException
JAXBExceptionpublic void marshal(Object target, Result result) throws JAXBException
marshal in interface MarshallerJAXBExceptionprotected final <T> void write(Name rootTagName, JaxBeanInfo<T> bi, T obj, XmlOutput out, Runnable postInitAction) throws JAXBException
BridgeImpl to write an arbitrary object as a fragment.JAXBExceptionprotected CharacterEscapeHandler createEscapeHandler(String encoding)
public XmlOutput createWriter(OutputStream os) throws JAXBException
JAXBExceptionpublic XmlOutput createWriter(OutputStream os, String encoding) throws JAXBException
JAXBExceptionpublic Object getProperty(String name) throws PropertyException
getProperty in interface MarshallergetProperty in class AbstractMarshallerImplPropertyExceptionpublic void setProperty(String name, Object value) throws PropertyException
setProperty in interface MarshallersetProperty in class AbstractMarshallerImplPropertyExceptionpublic <A extends XmlAdapter> void setAdapter(Class<A> type, A adapter)
setAdapter in interface MarshallersetAdapter in class AbstractMarshallerImplpublic <A extends XmlAdapter> A getAdapter(Class<A> type)
getAdapter in interface MarshallergetAdapter in class AbstractMarshallerImplpublic void setAttachmentMarshaller(AttachmentMarshaller am)
setAttachmentMarshaller in interface MarshallersetAttachmentMarshaller in class AbstractMarshallerImplpublic AttachmentMarshaller getAttachmentMarshaller()
getAttachmentMarshaller in interface MarshallergetAttachmentMarshaller in class AbstractMarshallerImplpublic Schema getSchema()
getSchema in interface MarshallergetSchema in class AbstractMarshallerImplpublic void setSchema(Schema s)
setSchema in interface MarshallersetSchema in class AbstractMarshallerImplpublic boolean handleEvent(ValidationEvent event)
Marshaller.handleEvent in interface ValidationEventHandlerpublic Marshaller.Listener getListener()
getListener in interface MarshallergetListener in class AbstractMarshallerImplpublic void setListener(Marshaller.Listener listener)
setListener in interface MarshallersetListener in class AbstractMarshallerImplCopyright © 2005–2017 Oracle Corporation. All rights reserved.