Apache CXF API

org.apache.cxf.jaxrs.provider
Class BinaryDataProvider

java.lang.Object
  extended by org.apache.cxf.jaxrs.provider.AbstractConfigurableProvider
      extended by org.apache.cxf.jaxrs.provider.BinaryDataProvider
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<Object>, javax.ws.rs.ext.MessageBodyWriter<Object>

public class BinaryDataProvider
extends AbstractConfigurableProvider
implements javax.ws.rs.ext.MessageBodyReader<Object>, javax.ws.rs.ext.MessageBodyWriter<Object>


Constructor Summary
BinaryDataProvider()
           
 
Method Summary
protected  void copyInputToOutput(InputStream is, OutputStream os, javax.ws.rs.core.MultivaluedMap<String,Object> outHeaders)
           
 long getSize(Object t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mt)
           
protected  void handleRangeRequest(InputStream is, OutputStream os, javax.ws.rs.core.HttpHeaders inHeaders, javax.ws.rs.core.MultivaluedMap<String,Object> outHeaders)
           
protected  boolean isRangeSupported()
           
 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)
           
 Object readFrom(Class<Object> clazz, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType type, javax.ws.rs.core.MultivaluedMap<String,String> headers, InputStream is)
           
 void writeTo(Object o, Class<?> clazz, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType type, javax.ws.rs.core.MultivaluedMap<String,Object> headers, OutputStream os)
           
 
Methods inherited from class org.apache.cxf.jaxrs.provider.AbstractConfigurableProvider
getBus, getConsumeMediaTypes, getEnableBuffering, getEnableStreaming, getProduceMediaTypes, init, setBus, setConsumeMediaTypes, setEnableBuffering, setEnableStreaming, setProduceMediaTypes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryDataProvider

public BinaryDataProvider()
Method Detail

isReadable

public boolean isReadable(Class<?> type,
                          Type genericType,
                          Annotation[] annotations,
                          javax.ws.rs.core.MediaType mt)
Specified by:
isReadable in interface javax.ws.rs.ext.MessageBodyReader<Object>

readFrom

public Object readFrom(Class<Object> clazz,
                       Type genericType,
                       Annotation[] annotations,
                       javax.ws.rs.core.MediaType type,
                       javax.ws.rs.core.MultivaluedMap<String,String> headers,
                       InputStream is)
                throws IOException
Specified by:
readFrom in interface javax.ws.rs.ext.MessageBodyReader<Object>
Throws:
IOException

getSize

public long getSize(Object t,
                    Class<?> type,
                    Type genericType,
                    Annotation[] annotations,
                    javax.ws.rs.core.MediaType mt)
Specified by:
getSize in interface javax.ws.rs.ext.MessageBodyWriter<Object>

isWriteable

public boolean isWriteable(Class<?> type,
                           Type genericType,
                           Annotation[] annotations,
                           javax.ws.rs.core.MediaType mt)
Specified by:
isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<Object>

writeTo

public void writeTo(Object o,
                    Class<?> clazz,
                    Type genericType,
                    Annotation[] annotations,
                    javax.ws.rs.core.MediaType type,
                    javax.ws.rs.core.MultivaluedMap<String,Object> headers,
                    OutputStream os)
             throws IOException
Specified by:
writeTo in interface javax.ws.rs.ext.MessageBodyWriter<Object>
Throws:
IOException

copyInputToOutput

protected void copyInputToOutput(InputStream is,
                                 OutputStream os,
                                 javax.ws.rs.core.MultivaluedMap<String,Object> outHeaders)
                          throws IOException
Throws:
IOException

handleRangeRequest

protected void handleRangeRequest(InputStream is,
                                  OutputStream os,
                                  javax.ws.rs.core.HttpHeaders inHeaders,
                                  javax.ws.rs.core.MultivaluedMap<String,Object> outHeaders)
                           throws IOException
Throws:
IOException

isRangeSupported

protected boolean isRangeSupported()

Apache CXF API

Apache CXF