Class DataSourceProvider
- java.lang.Object
-
- org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider<jakarta.activation.DataSource>
-
- org.glassfish.jersey.message.internal.DataSourceProvider
-
- All Implemented Interfaces:
MessageBodyReader<jakarta.activation.DataSource>,MessageBodyWriter<jakarta.activation.DataSource>
@Produces({"application/octet-stream","*/*"}) @Consumes({"application/octet-stream","*/*"}) public class DataSourceProvider extends AbstractMessageReaderWriterProvider<jakarta.activation.DataSource>
Provider for marshalling/un-marshalling ofapplication/octet-streamentity type to/from aDataSourceinstance.- Author:
- Paul Sandoz, Marek Potociar
-
-
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(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)booleanisWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)jakarta.activation.DataSourcereadFrom(Class<jakarta.activation.DataSource> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String,String> httpHeaders, InputStream entityStream)voidwriteTo(jakarta.activation.DataSource 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, getSize, readFromAsString, writeTo, writeTo, writeToAsString
-
-
-
-
Method Detail
-
isReadable
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
-
readFrom
public jakarta.activation.DataSource readFrom(Class<jakarta.activation.DataSource> 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)
-
writeTo
public void writeTo(jakarta.activation.DataSource t, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream) throws IOException- Throws:
IOException
-
-