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 of
application/octet-stream
entity type to/from a DataSource
instance.- Author:
- Paul Sandoz, Marek Potociar
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Modified 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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isReadable
(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) boolean
isWriteable
(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) jakarta.activation.DataSource
readFrom
(Class<jakarta.activation.DataSource> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) void
writeTo
(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
-
Constructor Details
-
DataSourceProvider
public DataSourceProvider()
-
-
Method Details
-
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
-