@Provider @Produces(value={"application/xml","application/*+xml","text/xml"}) @Consumes(value={"application/xml","application/*+xml","text/xml","text/html"}) public class SourceProvider<T> extends AbstractConfigurableProvider implements javax.ws.rs.ext.MessageBodyReader<T>, javax.ws.rs.ext.MessageBodyWriter<T>
BUNDLE
Constructor and Description |
---|
SourceProvider() |
Modifier and Type | Method and Description |
---|---|
protected XMLStreamReader |
configureReaderRestrictions(XMLStreamReader reader) |
protected MessageContext |
getContext() |
protected String |
getPreferredSource() |
protected XMLStreamReader |
getReader(InputStream is) |
protected XMLStreamReader |
getReaderFromMessage() |
protected InputStream |
getRealStream(InputStream is) |
long |
getSize(T source,
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> source,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType m,
javax.ws.rs.core.MultivaluedMap<String,String> headers,
InputStream is) |
void |
writeTo(T source,
Class<?> clazz,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mt,
javax.ws.rs.core.MultivaluedMap<String,Object> headers,
OutputStream os) |
getBus, getConsumeMediaTypes, getEnableBuffering, getEnableStreaming, getProduceMediaTypes, init, isPayloadEmpty, isPayloadEmpty, reportEmptyContentLength, setBus, setConsumeMediaTypes, setEnableBuffering, setEnableStreaming, setProduceMediaTypes
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 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> source, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType m, javax.ws.rs.core.MultivaluedMap<String,String> headers, InputStream is) throws IOException
readFrom
in interface javax.ws.rs.ext.MessageBodyReader<T>
IOException
protected XMLStreamReader getReader(InputStream is)
protected XMLStreamReader configureReaderRestrictions(XMLStreamReader reader)
protected InputStream getRealStream(InputStream is) throws IOException
IOException
protected XMLStreamReader getReaderFromMessage()
public void writeTo(T source, Class<?> clazz, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt, javax.ws.rs.core.MultivaluedMap<String,Object> headers, OutputStream os) throws IOException
writeTo
in interface javax.ws.rs.ext.MessageBodyWriter<T>
IOException
public long getSize(T source, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt)
getSize
in interface javax.ws.rs.ext.MessageBodyWriter<T>
protected String getPreferredSource()
protected MessageContext getContext()
Apache CXF