public class JettisonRootElementProvider extends AbstractRootElementJaxbProvider
@XmlRootElement
or @XmlType
.Modifier and Type | Class and Description |
---|---|
static class |
JettisonRootElementProvider.App |
static class |
JettisonRootElementProvider.General |
UTF8
Modifier and Type | Method and Description |
---|---|
boolean |
isReadable(Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType) |
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType) |
protected Object |
readFrom(Class<Object> type,
MediaType mediaType,
Unmarshaller u,
InputStream entityStream)
Unmarshal a JAXB type.
|
protected void |
writeTo(Object t,
MediaType mediaType,
Charset c,
Marshaller m,
OutputStream entityStream)
Marshal an instance of a JAXB type.
|
readFrom, writeTo
getMarshaller, getSAXSource, getStoredJaxbContext, getUnmarshaller, isFormattedOutput, isSupported, isXmlRootElementProcessing, setConfiguration, setHeader
getCharset, getSize, readFromAsString, writeTo, writeTo, writeToAsString
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
isReadable
in interface MessageBodyReader<Object>
isReadable
in class AbstractRootElementJaxbProvider
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
isWriteable
in interface MessageBodyWriter<Object>
isWriteable
in class AbstractRootElementJaxbProvider
protected final Object readFrom(Class<Object> type, MediaType mediaType, Unmarshaller u, InputStream entityStream) throws JAXBException
AbstractRootElementJaxbProvider
Implementing classes may override this method.
readFrom
in class AbstractRootElementJaxbProvider
type
- the JAXB typemediaType
- the media typeu
- the unmarshaller to use for unmarshalling.entityStream
- the input stream to unmarshal from.JAXBException
- in case the JAXB unmarshalling fails.protected void writeTo(Object t, MediaType mediaType, Charset c, Marshaller m, OutputStream entityStream) throws JAXBException
AbstractRootElementJaxbProvider
Implementing classes may override this method.
writeTo
in class AbstractRootElementJaxbProvider
t
- the instance of the JAXB type.mediaType
- the media type.c
- the character set to serialize characters to.m
- the marshaller to marshaller the instance of the JAXB type.entityStream
- the output stream to marshal to.JAXBException
- in case the JAXB marshalling fails.Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.