Package ubic.gemma.rest.providers
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetSize(Sendfile sendfile, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) booleanisWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) voidwriteTo(Sendfile sendfile, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream)
-
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:
isWriteablein interfacejavax.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:
getSizein interfacejavax.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:
writeToin interfacejavax.ws.rs.ext.MessageBodyWriter<Sendfile>- Throws:
IOExceptionjavax.ws.rs.WebApplicationException
-