@Provider @Produces(value={"application/xml","application/*+xml","text/xml"}) @Consumes(value={"application/xml","application/*+xml","text/xml"}) public class DataBindingProvider<T> extends Object implements javax.ws.rs.ext.MessageBodyReader<T>, javax.ws.rs.ext.MessageBodyWriter<T>
Constructor and Description |
---|
DataBindingProvider() |
DataBindingProvider(DataBinding db) |
Modifier and Type | Method and Description |
---|---|
protected XMLStreamReader |
createReader(Class<?> clazz,
Type genericType,
InputStream is) |
protected XMLStreamWriter |
createWriter(Class<?> clazz,
Type genericType,
String enc,
OutputStream os) |
long |
getSize(T t,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mt) |
boolean |
isReadable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mt) |
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mt) |
T |
readFrom(Class<T> clazz,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType type,
javax.ws.rs.core.MultivaluedMap<String,String> headers,
InputStream is) |
void |
setDataBinding(DataBinding db) |
void |
writeTo(T o,
Class<?> clazz,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType m,
javax.ws.rs.core.MultivaluedMap<String,Object> headers,
OutputStream os) |
protected void |
writeToWriter(XMLStreamWriter writer,
Object o) |
public DataBindingProvider()
public DataBindingProvider(DataBinding db)
public void setDataBinding(DataBinding db)
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt)
isReadable
in interface javax.ws.rs.ext.MessageBodyReader<T>
public T readFrom(Class<T> clazz, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType type, javax.ws.rs.core.MultivaluedMap<String,String> headers, InputStream is) throws IOException
readFrom
in interface javax.ws.rs.ext.MessageBodyReader<T>
IOException
protected XMLStreamReader createReader(Class<?> clazz, Type genericType, InputStream is) throws Exception
Exception
public long getSize(T t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt)
getSize
in interface javax.ws.rs.ext.MessageBodyWriter<T>
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt)
isWriteable
in interface javax.ws.rs.ext.MessageBodyWriter<T>
public void writeTo(T o, Class<?> clazz, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType m, javax.ws.rs.core.MultivaluedMap<String,Object> headers, OutputStream os) throws IOException
writeTo
in interface javax.ws.rs.ext.MessageBodyWriter<T>
IOException
protected void writeToWriter(XMLStreamWriter writer, Object o) throws Exception
Exception
protected XMLStreamWriter createWriter(Class<?> clazz, Type genericType, String enc, OutputStream os) throws Exception
Exception
Apache CXF