public class JSONListElementProvider extends AbstractListElementProvider
Modifier and Type | Class and Description |
---|---|
static class |
JSONListElementProvider.App |
static class |
JSONListElementProvider.General |
AbstractListElementProvider.JaxbTypeChecker
UTF8
Modifier and Type | Method and Description |
---|---|
protected XMLStreamReader |
getXMLStreamReader(Class<?> elementType,
javax.ws.rs.core.MediaType mediaType,
Unmarshaller u,
InputStream entityStream)
Get the XMLStreamReader for unmarshalling.
|
boolean |
isReadable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
void |
setConfiguration(FeaturesAndProperties fp) |
void |
writeList(Class<?> elementType,
Collection<?> t,
javax.ws.rs.core.MediaType mediaType,
Charset c,
Marshaller m,
OutputStream entityStream)
Write a collection of JAXB objects as child elements of the root element.
|
getElementClass, getElementName, getRootElementName, readFrom, verifyArrayType, verifyCollectionSubclass, verifyGenericType, writeTo
getMarshaller, getSAXSource, getStoredJAXBContext, getUnmarshaller, isFormattedOutput, isSupported, isXmlRootElementProcessing, setHeader
getCharset, getSize, readFromAsString, writeTo, writeTo, writeToAsString
@Context public void setConfiguration(FeaturesAndProperties fp)
setConfiguration
in class AbstractJAXBProvider<Object>
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isReadable
in interface javax.ws.rs.ext.MessageBodyReader<Object>
isReadable
in class AbstractListElementProvider
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isWriteable
in interface javax.ws.rs.ext.MessageBodyWriter<Object>
isWriteable
in class AbstractListElementProvider
public final void writeList(Class<?> elementType, Collection<?> t, javax.ws.rs.core.MediaType mediaType, Charset c, Marshaller m, OutputStream entityStream) throws JAXBException, IOException
AbstractListElementProvider
writeList
in class AbstractListElementProvider
elementType
- the element type in the collection.t
- the collecton to marshallmediaType
- the media typec
- the charsetm
- the marshallerentityStream
- the output stream to marshall the collectionJAXBException
IOException
protected final XMLStreamReader getXMLStreamReader(Class<?> elementType, javax.ws.rs.core.MediaType mediaType, Unmarshaller u, InputStream entityStream) throws XMLStreamException
AbstractListElementProvider
getXMLStreamReader
in class AbstractListElementProvider
elementType
- the individual element type.mediaType
- the media type.u
- the unmarshaller as a carrier of possible config options.entityStream
- the input stream.XMLStreamException
Copyright © 2013 Oracle Corporation. All rights reserved.