@Produces(value={"application/octet-stream","*/*"})
@Consumes(value={"application/octet-stream","*/*"})
public class DataSourceProvider
extends AbstractMessageReaderWriterProvider<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(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
DataSource |
readFrom(Class<DataSource> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders,
InputStream entityStream) |
void |
writeTo(DataSource t,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream) |
getCharset, getSize, readFromAsString, writeTo, writeTo, writeToAsStringpublic boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
public DataSource readFrom(Class<DataSource> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream) throws IOException
IOExceptionpublic boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
public void writeTo(DataSource t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream) throws IOException
IOExceptionCopyright © 2007-2021, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.