@Provider @Produces(value="multipart/mixed") @Consumes(value={"multipart/mixed","multipart/form-data"}) public class MimeMultipartProvider extends AbstractEntityProvider<javax.mail.internet.MimeMultipart>
MimeMultipart as a method
parameter or a return value and the| Constructor and Description |
|---|
MimeMultipartProvider() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isReadable(Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType)
Ascertain if the MessageBodyReader can produce an instance of a
particular type.
|
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType)
Ascertain if the MessageBodyWriter supports a particular type.
|
static DataSource |
readDataSource(InputStream in,
MediaType mediaType) |
javax.mail.internet.MimeMultipart |
readFrom(Class<javax.mail.internet.MimeMultipart> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String,String> httpHeaders,
InputStream entityStream)
FIXME Comment this
|
void |
writeTo(javax.mail.internet.MimeMultipart mimeMultipart,
Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream)
FIXME Comment this
|
getSizepublic static DataSource readDataSource(InputStream in, MediaType mediaType) throws IOException
in - mediaType - IOExceptionpublic boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
MessageBodyReadertype parameter gives the
class of the instance that should be produced, the genericType parameter
gives the java.lang.reflect.Type of the instance
that should be produced.
E.g. if the instance to be produced is List<String>, the type parameter
will be java.util.List and the genericType parameter will be
java.lang.reflect.ParameterizedType.type - genericType - annotations - mediaType - the media type of the HTTP entity, if one is not
specified in the request then application/octet-stream is
used.public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
MessageBodyWritertype - genericType - annotations - mediaType - the media type of the HTTP entity.public javax.mail.internet.MimeMultipart readFrom(Class<javax.mail.internet.MimeMultipart> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String,String> httpHeaders, InputStream entityStream) throws IOException
type - genericType - annotations - mediaType - httpHeaders - entityStream - IOExceptionWebApplicationExceptionjavax.ws.rs.ext.MessageBodyReader#readFrom(java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap, java.io.InputStream)public void writeTo(javax.mail.internet.MimeMultipart mimeMultipart,
Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream)
throws IOException
mimeMultipart - type - genericType - annotations - mediaType - httpHeaders - entityStream - IOExceptionjavax.ws.rs.ext.MessageBodyWriter#writeTo(java.lang.Object, java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap, java.io.OutputStream)Copyright © 2013. All Rights Reserved.