public interface XMLBridge<T>
Instances of this class is stateless and multi-thread safe. They are reentrant.
All the marshal operation generates fragments.
Subject to change without notice.
Modifier and Type | Method and Description |
---|---|
BindingContext |
context()
Gets the
BindingContext to which this object belongs. |
TypeInfo |
getTypeInfo()
Gets the
TypeInfo from which this bridge was created. |
void |
marshal(T object,
ContentHandler contentHandler,
AttachmentMarshaller am) |
void |
marshal(T object,
Node output) |
void |
marshal(T object,
OutputStream output,
NamespaceContext nsContext,
AttachmentMarshaller am) |
void |
marshal(T object,
Result result) |
void |
marshal(T object,
XMLStreamWriter output,
AttachmentMarshaller am) |
boolean |
supportOutputStream()
This can be used to determine whether XMLStreamWriter or OutputStream is
prefered by the implementation.
|
T |
unmarshal(InputStream in)
Unmarshals the specified type object.
|
T |
unmarshal(Node n,
AttachmentUnmarshaller au) |
T |
unmarshal(Source in,
AttachmentUnmarshaller au) |
T |
unmarshal(XMLStreamReader in,
AttachmentUnmarshaller au) |
@NotNull BindingContext context()
BindingContext
to which this object belongs.void marshal(T object, XMLStreamWriter output, AttachmentMarshaller am) throws JAXBException
JAXBException
- if there was an error while marshalling.void marshal(T object, OutputStream output, NamespaceContext nsContext, AttachmentMarshaller am) throws JAXBException
JAXBException
void marshal(T object, Node output) throws JAXBException
JAXBException
void marshal(T object, ContentHandler contentHandler, AttachmentMarshaller am) throws JAXBException
JAXBException
void marshal(T object, Result result) throws JAXBException
JAXBException
@NotNull T unmarshal(@NotNull XMLStreamReader in, @Nullable AttachmentUnmarshaller au) throws JAXBException
JAXBException
@NotNull T unmarshal(@NotNull Source in, @Nullable AttachmentUnmarshaller au) throws JAXBException
JAXBException
@NotNull T unmarshal(@NotNull InputStream in) throws JAXBException
in
- the parser must be pointing at a start tag
that encloses the XML type that this XMLBridge
is
instanciated for.JAXBException
- if there was an error while unmarshalling.@NotNull T unmarshal(@NotNull Node n, @Nullable AttachmentUnmarshaller au) throws JAXBException
JAXBException
boolean supportOutputStream()
Copyright © 2015 Oracle Corporation. All rights reserved.