public class DataFormatProvider<T> extends Object implements javax.ws.rs.ext.MessageBodyWriter<T>, javax.ws.rs.ext.MessageBodyReader<T>
| Constructor and Description |
|---|
DataFormatProvider() |
| Modifier and Type | Method and Description |
|---|---|
long |
getSize(T obj,
Class<?> cls,
Type type,
Annotation[] anns,
javax.ws.rs.core.MediaType mt) |
boolean |
isReadable(Class<?> cls,
Type type,
Annotation[] anns,
javax.ws.rs.core.MediaType mt) |
boolean |
isWriteable(Class<?> cls,
Type type,
Annotation[] anns,
javax.ws.rs.core.MediaType mt) |
T |
readFrom(Class<T> cls,
Type type,
Annotation[] anns,
javax.ws.rs.core.MediaType mt,
javax.ws.rs.core.MultivaluedMap<String,String> headers,
InputStream is) |
void |
setFormat(org.apache.camel.spi.DataFormat format) |
void |
setFormat(String mediaType,
org.apache.camel.spi.DataFormat format) |
void |
setFormats(Map<String,org.apache.camel.spi.DataFormat> formats) |
void |
writeTo(T obj,
Class<?> cls,
Type type,
Annotation[] anns,
javax.ws.rs.core.MediaType mt,
javax.ws.rs.core.MultivaluedMap<String,Object> headers,
OutputStream os) |
public boolean isReadable(Class<?> cls, Type type, Annotation[] anns, javax.ws.rs.core.MediaType mt)
isReadable in interface javax.ws.rs.ext.MessageBodyReader<T>public boolean isWriteable(Class<?> cls, Type type, Annotation[] anns, javax.ws.rs.core.MediaType mt)
isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<T>public T readFrom(Class<T> cls, Type type, Annotation[] anns, javax.ws.rs.core.MediaType mt, javax.ws.rs.core.MultivaluedMap<String,String> headers, InputStream is) throws IOException, javax.ws.rs.WebApplicationException
readFrom in interface javax.ws.rs.ext.MessageBodyReader<T>IOExceptionjavax.ws.rs.WebApplicationExceptionpublic long getSize(T obj, Class<?> cls, Type type, Annotation[] anns, javax.ws.rs.core.MediaType mt)
getSize in interface javax.ws.rs.ext.MessageBodyWriter<T>public void writeTo(T obj, Class<?> cls, Type type, Annotation[] anns, javax.ws.rs.core.MediaType mt, javax.ws.rs.core.MultivaluedMap<String,Object> headers, OutputStream os) throws IOException, javax.ws.rs.WebApplicationException
writeTo in interface javax.ws.rs.ext.MessageBodyWriter<T>IOExceptionjavax.ws.rs.WebApplicationExceptionpublic void setFormat(org.apache.camel.spi.DataFormat format)
public void setFormat(String mediaType, org.apache.camel.spi.DataFormat format)
Apache Camel