@Produces(value={"application/octet-stream","*/*"})
@Consumes(value={"application/octet-stream","*/*"})
public class DataSourceProvider
extends AbstractMessageReaderWriterProvider<javax.activation.DataSource>
application/octet-stream
entity type to/from a DataSource instance.| Modifier and Type | Class and Description |
|---|---|
static class |
DataSourceProvider.ByteArrayDataSource
Modified from javax.mail.util.ByteArrayDataSource
A DataSource backed by a byte array.
|
UTF8| Constructor and Description |
|---|
DataSourceProvider() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isReadable(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
boolean |
isWriteable(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
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) |
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) |
getCharset, getSize, readFromAsString, writeTo, writeTo, writeToAsStringpublic boolean isReadable(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
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
java.io.IOExceptionpublic boolean isWriteable(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
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
java.io.IOException