public abstract class XmlCollectionJaxbProvider extends AbstractCollectionJaxbProvider
| Modifier and Type | Class and Description |
|---|---|
static class |
XmlCollectionJaxbProvider.App
JAXB provider for marshalling/un-marshalling collections
from/to entities of
application/xml media type. |
static class |
XmlCollectionJaxbProvider.General
JAXB provider for marshalling/un-marshalling collections
from/to entities of
<type>/<sub-type>+xml media types. |
static class |
XmlCollectionJaxbProvider.Text
JAXB provider for marshalling/un-marshalling collections
from/to entities of
text/xml media type. |
AbstractCollectionJaxbProvider.JaxbTypeChecker| Modifier and Type | Field and Description |
|---|---|
private org.glassfish.hk2.api.Factory<javax.xml.stream.XMLInputFactory> |
xif |
UTF8| Constructor and Description |
|---|
XmlCollectionJaxbProvider(org.glassfish.hk2.api.Factory<javax.xml.stream.XMLInputFactory> xif,
javax.ws.rs.ext.Providers ps) |
XmlCollectionJaxbProvider(org.glassfish.hk2.api.Factory<javax.xml.stream.XMLInputFactory> xif,
javax.ws.rs.ext.Providers ps,
javax.ws.rs.core.MediaType mt) |
| Modifier and Type | Method and Description |
|---|---|
protected javax.xml.stream.XMLStreamReader |
getXMLStreamReader(java.lang.Class<?> elementType,
javax.ws.rs.core.MediaType mediaType,
javax.xml.bind.Unmarshaller u,
java.io.InputStream entityStream)
Get the
XMLStreamReader for unmarshalling. |
void |
writeCollection(java.lang.Class<?> elementType,
java.util.Collection<?> t,
javax.ws.rs.core.MediaType mediaType,
java.nio.charset.Charset c,
javax.xml.bind.Marshaller m,
java.io.OutputStream entityStream)
Write a collection of JAXB objects as child elements of the root element.
|
getElementClass, getElementName, getRootElementName, isReadable, isWriteable, readFrom, verifyArrayType, verifyCollectionSubclass, verifyGenericType, writeTogetMarshaller, getSAXSource, getStoredJaxbContext, getUnmarshaller, isFormattedOutput, isSupported, isXmlRootElementProcessing, setConfiguration, setHeadergetCharset, getSize, readFromAsString, writeTo, writeTo, writeToAsStringXmlCollectionJaxbProvider(org.glassfish.hk2.api.Factory<javax.xml.stream.XMLInputFactory> xif,
javax.ws.rs.ext.Providers ps)
XmlCollectionJaxbProvider(org.glassfish.hk2.api.Factory<javax.xml.stream.XMLInputFactory> xif,
javax.ws.rs.ext.Providers ps,
javax.ws.rs.core.MediaType mt)
protected final javax.xml.stream.XMLStreamReader getXMLStreamReader(java.lang.Class<?> elementType,
javax.ws.rs.core.MediaType mediaType,
javax.xml.bind.Unmarshaller u,
java.io.InputStream entityStream)
throws javax.xml.stream.XMLStreamException
AbstractCollectionJaxbProviderXMLStreamReader for unmarshalling.getXMLStreamReader in class AbstractCollectionJaxbProviderelementType - the individual element type.mediaType - the media type.u - the unmarshaller as a carrier of possible config options.entityStream - the input stream.javax.xml.stream.XMLStreamException - in case XMLStreamReader retrieval fails.public final void writeCollection(java.lang.Class<?> elementType,
java.util.Collection<?> t,
javax.ws.rs.core.MediaType mediaType,
java.nio.charset.Charset c,
javax.xml.bind.Marshaller m,
java.io.OutputStream entityStream)
throws javax.xml.bind.JAXBException,
java.io.IOException
AbstractCollectionJaxbProviderwriteCollection in class AbstractCollectionJaxbProviderelementType - the element type in the collection.t - the collection to marshallmediaType - the media typec - the charsetm - the marshallerentityStream - the output stream to marshall the collectionjavax.xml.bind.JAXBException - in case the marshalling of element collection fails.java.io.IOException - in case of any other I/O error while marshalling the collection of JAXB objects.