Class DataSourceProvider
- java.lang.Object
-
- org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider<javax.activation.DataSource>
-
- org.glassfish.jersey.message.internal.DataSourceProvider
-
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<javax.activation.DataSource>,javax.ws.rs.ext.MessageBodyWriter<javax.activation.DataSource>
@Produces({"application/octet-stream","*/*"}) @Consumes({"application/octet-stream","*/*"}) public class DataSourceProvider extends AbstractMessageReaderWriterProvider<javax.activation.DataSource>Provider for marshalling/un-marshalling ofapplication/octet-streamentity type to/from aDataSourceinstance.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDataSourceProvider.ByteArrayDataSourceModified from javax.mail.util.ByteArrayDataSource A DataSource backed by a byte array.
-
Field Summary
-
Fields inherited from class org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider
UTF8
-
-
Constructor Summary
Constructors Constructor Description DataSourceProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisReadable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)booleanisWriteable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)javax.activation.DataSourcereadFrom(java.lang.Class<javax.activation.DataSource> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> httpHeaders, java.io.InputStream entityStream)voidwriteTo(javax.activation.DataSource t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders, java.io.OutputStream entityStream)-
Methods inherited from class org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider
getCharset, getSize, readFromAsString, writeTo, writeTo, writeToAsString
-
-
-
-
Method Detail
-
isReadable
public boolean isReadable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
-
readFrom
public javax.activation.DataSource readFrom(java.lang.Class<javax.activation.DataSource> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> httpHeaders, java.io.InputStream entityStream) throws java.io.IOException- Throws:
java.io.IOException
-
isWriteable
public boolean isWriteable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
-
writeTo
public void writeTo(javax.activation.DataSource t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders, java.io.OutputStream entityStream) throws java.io.IOException- Throws:
java.io.IOException
-
-