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 TypeMethodDescriptionlong
getSize
(Sendfile sendfile, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) boolean
isWriteable
(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) 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)
-
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 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:
getSize
in 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:
writeTo
in interfacejavax.ws.rs.ext.MessageBodyWriter<Sendfile>
- Throws:
IOException
javax.ws.rs.WebApplicationException
-