@Provider
@Consumes(value={"application/xml","application/*+xml","text/xml","text/*+xml"})
@Produces(value={"application/xml","application/*+xml","text/xml","text/*+xml"})
public class JAXBObjectEntityProvider
extends Object
implements EntityProvider<Object>
| Constructor and Description |
|---|
JAXBObjectEntityProvider(javax.ws.rs.ext.Providers providers) |
| Modifier and Type | Method and Description |
|---|---|
protected JAXBContext |
getJAXBContext(Class<?> type,
javax.ws.rs.core.MediaType mediaType) |
long |
getSize(Object t,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
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) |
Object |
readFrom(Class<Object> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders,
InputStream entityStream) |
void |
writeTo(Object t,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream) |
public JAXBObjectEntityProvider(@Context
javax.ws.rs.ext.Providers providers)
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isReadable in interface javax.ws.rs.ext.MessageBodyReader<Object>public Object readFrom(Class<Object> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream) throws IOException
readFrom in interface javax.ws.rs.ext.MessageBodyReader<Object>IOExceptionpublic long getSize(Object t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
getSize in interface javax.ws.rs.ext.MessageBodyWriter<Object>public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<Object>public void writeTo(Object t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream) throws IOException
writeTo in interface javax.ws.rs.ext.MessageBodyWriter<Object>IOExceptionprotected JAXBContext getJAXBContext(Class<?> type, javax.ws.rs.core.MediaType mediaType) throws JAXBException
type - typemediaType - media typeJAXBException - if JAXBContext creation failedCopyright © 2015. All rights reserved.