Class SendfileProvider

java.lang.Object
ubic.gemma.rest.providers.SendfileProvider
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyWriter<Sendfile>

@Provider @Component @Produces({"application/octet-stream","*/*"}) public class SendfileProvider extends Object implements javax.ws.rs.ext.MessageBodyWriter<Sendfile>
Author:
poirigui
See Also:
  • Constructor Details

    • SendfileProvider

      public SendfileProvider()
  • Method Details

    • isWriteable

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

      public long getSize(Sendfile sendfile, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
      Specified by:
      getSize in interface javax.ws.rs.ext.MessageBodyWriter<Sendfile>
    • writeTo

      public void writeTo(Sendfile sendfile, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream) throws IOException, javax.ws.rs.WebApplicationException
      Specified by:
      writeTo in interface javax.ws.rs.ext.MessageBodyWriter<Sendfile>
      Throws:
      IOException
      javax.ws.rs.WebApplicationException