com.sun.jersey.json.impl.provider.entity
Class JSONRootElementProvider
java.lang.Object
com.sun.jersey.core.provider.AbstractMessageReaderWriterProvider<T>
com.sun.jersey.core.provider.jaxb.AbstractJAXBProvider<java.lang.Object>
com.sun.jersey.core.provider.jaxb.AbstractRootElementProvider
com.sun.jersey.json.impl.provider.entity.JSONRootElementProvider
- All Implemented Interfaces:
- javax.ws.rs.ext.MessageBodyReader<java.lang.Object>, javax.ws.rs.ext.MessageBodyWriter<java.lang.Object>
- Direct Known Subclasses:
- JSONRootElementProvider.App, JSONRootElementProvider.General
public class JSONRootElementProvider
- extends AbstractRootElementProvider
- Author:
- Paul.Sandoz@Sun.Com, Jakub.Podlesak@Sun.COM
Method Summary |
protected java.lang.Object |
readFrom(java.lang.Class<java.lang.Object> type,
javax.ws.rs.core.MediaType mediaType,
javax.xml.bind.Unmarshaller u,
java.io.InputStream entityStream)
Unmarshal a JAXB type. |
protected void |
writeTo(java.lang.Object t,
javax.ws.rs.core.MediaType mediaType,
java.nio.charset.Charset c,
javax.xml.bind.Marshaller m,
java.io.OutputStream entityStream)
Marshal an instance of a JAXB type. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
readFrom
protected final java.lang.Object readFrom(java.lang.Class<java.lang.Object> type,
javax.ws.rs.core.MediaType mediaType,
javax.xml.bind.Unmarshaller u,
java.io.InputStream entityStream)
throws javax.xml.bind.JAXBException
- Description copied from class:
AbstractRootElementProvider
- Unmarshal a JAXB type.
Implementing classes may override this method.
- Overrides:
readFrom
in class AbstractRootElementProvider
- Parameters:
type
- the JAXB typemediaType
- the media typeu
- the unmarshaller to use for unmarshalling.entityStream
- the input stream to unmarshal from.
- Returns:
- an instance of the JAXB type.
- Throws:
javax.xml.bind.JAXBException
writeTo
protected void writeTo(java.lang.Object 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
- Description copied from class:
AbstractRootElementProvider
- Marshal an instance of a JAXB type.
Implementing classes may override this method.
- Overrides:
writeTo
in class AbstractRootElementProvider
- Parameters:
t
- the instance of the JAXB type.mediaType
- the meida 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.
- Throws:
javax.xml.bind.JAXBException
Copyright © 2011 Sun Microsystems, Inc. All Rights Reserved.