Class StreamingOutputProvider
java.lang.Object
org.glassfish.jersey.message.internal.StreamingOutputProvider
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyWriter<javax.ws.rs.core.StreamingOutput>
@Produces({"application/octet-stream","*/*"})
@Singleton
public final class StreamingOutputProvider
extends Object
implements javax.ws.rs.ext.MessageBodyWriter<javax.ws.rs.core.StreamingOutput>
Message body writer that supports
streaming output
marshalling.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
getSize
(javax.ws.rs.core.StreamingOutput o, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) boolean
isWriteable
(Class<?> t, Type gt, Annotation[] as, javax.ws.rs.core.MediaType mediaType) void
writeTo
(javax.ws.rs.core.StreamingOutput o, Class<?> t, Type gt, Annotation[] as, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream entity)
-
Constructor Details
-
StreamingOutputProvider
public StreamingOutputProvider()
-
-
Method Details
-
isWriteable
public boolean isWriteable(Class<?> t, Type gt, Annotation[] as, javax.ws.rs.core.MediaType mediaType) - Specified by:
isWriteable
in interfacejavax.ws.rs.ext.MessageBodyWriter<javax.ws.rs.core.StreamingOutput>
-
getSize
public long getSize(javax.ws.rs.core.StreamingOutput o, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) - Specified by:
getSize
in interfacejavax.ws.rs.ext.MessageBodyWriter<javax.ws.rs.core.StreamingOutput>
-
writeTo
public void writeTo(javax.ws.rs.core.StreamingOutput o, Class<?> t, Type gt, Annotation[] as, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream entity) throws IOException- Specified by:
writeTo
in interfacejavax.ws.rs.ext.MessageBodyWriter<javax.ws.rs.core.StreamingOutput>
- Throws:
IOException
-