Class InputStreamProvider
java.lang.Object
org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider<InputStream>
org.glassfish.jersey.message.internal.InputStreamProvider
- All Implemented Interfaces:
MessageBodyReader<InputStream>
,MessageBodyWriter<InputStream>
@Produces({"application/octet-stream","*/*"})
@Consumes({"application/octet-stream","*/*"})
@Singleton
public final class InputStreamProvider
extends AbstractMessageReaderWriterProvider<InputStream>
- Author:
- Paul Sandoz
-
Field Summary
Fields inherited from class org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider
UTF8
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
getSize
(InputStream t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) boolean
isReadable
(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) boolean
isWriteable
(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) readFrom
(Class<InputStream> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) void
writeTo
(InputStream t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) Methods inherited from class org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider
getCharset, readFromAsString, writeTo, writeTo, writeToAsString
-
Constructor Details
-
InputStreamProvider
public InputStreamProvider()
-
-
Method Details
-
isReadable
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) -
readFrom
public InputStream readFrom(Class<InputStream> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException- Throws:
IOException
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) -
getSize
public long getSize(InputStream t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) - Specified by:
getSize
in interfaceMessageBodyWriter<InputStream>
- Overrides:
getSize
in classAbstractMessageReaderWriterProvider<InputStream>
-
writeTo
public void writeTo(InputStream t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException- Throws:
IOException
-