org.glassfish.jersey.message.internal
Class XmlCollectionJaxbProvider
java.lang.Object
org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider<T>
org.glassfish.jersey.message.internal.AbstractJaxbProvider<Object>
org.glassfish.jersey.message.internal.AbstractCollectionJaxbProvider
org.glassfish.jersey.message.internal.XmlCollectionJaxbProvider
- All Implemented Interfaces:
- MessageBodyReader<Object>, MessageBodyWriter<Object>
- Direct Known Subclasses:
- XmlCollectionJaxbProvider.App, XmlCollectionJaxbProvider.General, XmlCollectionJaxbProvider.Text
public abstract class XmlCollectionJaxbProvider
- extends AbstractCollectionJaxbProvider
Base XML-based message body provider for collections of JAXB beans.
- Author:
- Paul Sandoz, Marek Potociar (marek.potociar at oracle.com)
|
Nested Class Summary |
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getXMLStreamReader
protected final XMLStreamReader getXMLStreamReader(Class<?> elementType,
MediaType mediaType,
Unmarshaller u,
InputStream entityStream)
throws XMLStreamException
- Description copied from class:
AbstractCollectionJaxbProvider
- Get the XMLStreamReader for unmarshalling.
- Specified by:
getXMLStreamReader in class AbstractCollectionJaxbProvider
- Parameters:
elementType - the individual element type.mediaType - the media type.u - the unmarshaller as a carrier of possible config options.entityStream - the input stream.
- Returns:
- the XMLStreamReader.
- Throws:
XMLStreamException
writeList
public final void writeList(Class<?> elementType,
Collection<?> t,
MediaType mediaType,
Charset c,
Marshaller m,
OutputStream entityStream)
throws JAXBException,
IOException
- Description copied from class:
AbstractCollectionJaxbProvider
- Write a collection of JAXB objects as child elements of the root element.
- Specified by:
writeList in class AbstractCollectionJaxbProvider
- Parameters:
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 collection
- Throws:
JAXBException
IOException
Copyright © 2007-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.