public abstract class XmlJaxbElementProvider extends AbstractJaxbElementProvider
JAXB element
instances.Modifier and Type | Class and Description |
---|---|
static class |
XmlJaxbElementProvider.App
Provider for marshalling/un-marshalling
JAXB elements
from/to entities of application/xml media type. |
static class |
XmlJaxbElementProvider.General
Provider for marshalling/un-marshalling
JAXB elements
from/to entities of <type>/<sub-type>+xml media types. |
static class |
XmlJaxbElementProvider.Text
Provider for marshalling/un-marshalling
JAXB elements
from/to entities of text/xml media type. |
UTF8
Constructor and Description |
---|
XmlJaxbElementProvider(jakarta.inject.Provider<SAXParserFactory> spf,
jakarta.ws.rs.ext.Providers ps,
jakarta.ws.rs.core.Configuration config) |
XmlJaxbElementProvider(jakarta.inject.Provider<SAXParserFactory> spf,
jakarta.ws.rs.ext.Providers ps,
jakarta.ws.rs.core.MediaType mt,
jakarta.ws.rs.core.Configuration config) |
Modifier and Type | Method and Description |
---|---|
protected jakarta.xml.bind.JAXBElement<?> |
readFrom(Class<?> type,
jakarta.ws.rs.core.MediaType mediaType,
jakarta.xml.bind.Unmarshaller unmarshaller,
InputStream entityStream)
Read JAXB element from an entity stream.
|
protected void |
writeTo(jakarta.xml.bind.JAXBElement<?> t,
jakarta.ws.rs.core.MediaType mediaType,
Charset c,
jakarta.xml.bind.Marshaller m,
OutputStream entityStream)
Write JAXB element to an entity stream.
|
isReadable, isWriteable, readFrom, writeTo
getMarshaller, getSAXSource, getStoredJaxbContext, getUnmarshaller, isFormattedOutput, isSupported, isXmlRootElementProcessing, setConfiguration, setHeader
getCharset, getSize, readFromAsString, writeTo, writeTo, writeToAsString
public XmlJaxbElementProvider(jakarta.inject.Provider<SAXParserFactory> spf, jakarta.ws.rs.ext.Providers ps, jakarta.ws.rs.core.Configuration config)
public XmlJaxbElementProvider(jakarta.inject.Provider<SAXParserFactory> spf, jakarta.ws.rs.ext.Providers ps, jakarta.ws.rs.core.MediaType mt, jakarta.ws.rs.core.Configuration config)
protected final jakarta.xml.bind.JAXBElement<?> readFrom(Class<?> type, jakarta.ws.rs.core.MediaType mediaType, jakarta.xml.bind.Unmarshaller unmarshaller, InputStream entityStream) throws jakarta.xml.bind.JAXBException
AbstractJaxbElementProvider
readFrom
in class AbstractJaxbElementProvider
type
- the type that is to be read from the entity stream.mediaType
- the media type of the HTTP entity.unmarshaller
- JAXB unmarshaller to be used.entityStream
- the InputStream
of the HTTP entity. The
caller is responsible for ensuring that the input stream ends when the
entity has been consumed. The implementation should not close the input
stream.jakarta.xml.bind.JAXBException
- in case entity unmarshalling fails.protected final void writeTo(jakarta.xml.bind.JAXBElement<?> t, jakarta.ws.rs.core.MediaType mediaType, Charset c, jakarta.xml.bind.Marshaller m, OutputStream entityStream) throws jakarta.xml.bind.JAXBException
AbstractJaxbElementProvider
writeTo
in class AbstractJaxbElementProvider
t
- JAXB element to be written to an entity stream.mediaType
- the media type of the HTTP entity.c
- character set to be used.m
- JAXB unmarshaller to be used.entityStream
- the InputStream
of the HTTP entity. The
caller is responsible for ensuring that the input stream ends when the
entity has been consumed. The implementation should not close the input
stream.jakarta.xml.bind.JAXBException
- in case entity marshalling fails.Copyright © 2007-2021, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.