|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jersey.multipart.impl.MultiPartReaderClientSide
@ConstrainedTo(value=ClientSide.class) public class MultiPartReaderClientSide
Provider
MessageBodyReader
implementation for
MultiPart
entities.
Constructor Summary | |
---|---|
MultiPartReaderClientSide(Providers providers,
MultiPartConfig config)
Accept constructor injection of the configuration parameters for this application. |
Method Summary | |
---|---|
boolean |
isReadable(Class<?> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType)
Ascertain if the MessageBodyReader can produce an instance of a particular type. |
MultiPart |
readFrom(Class<MultiPart> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String,String> headers,
InputStream stream)
Read the entire list of body parts from the Input stream, using the appropriate provider implementation to deserialize each body part's entity. |
protected MultiPart |
readMultiPart(Class<MultiPart> type,
Type genericType,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String,String> headers,
InputStream stream)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MultiPartReaderClientSide(@Context Providers providers, @Context MultiPartConfig config)
Accept constructor injection of the configuration parameters for this application.
Method Detail |
---|
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType)
MessageBodyReader
isReadable
in interface MessageBodyReader<MultiPart>
type
- the class of object to be produced.genericType
- the type of object to be produced. E.g. if the
message body is to be converted into a method parameter, this will be
the formal type of the method parameter as returned by
Method.getGenericParameterTypes
.annotations
- an array of the annotations on the declaration of the
artifact that will be initialized with the produced instance. E.g. if the
message body is to be converted into a method parameter, this will be
the annotations on that parameter returned by
Method.getParameterAnnotations
.mediaType
- the media type of the HTTP entity, if one is not
specified in the request then application/octet-stream
is
used.
public MultiPart readFrom(Class<MultiPart> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String,String> headers, InputStream stream) throws IOException, WebApplicationException
Read the entire list of body parts from the Input stream, using the appropriate provider implementation to deserialize each body part's entity.
readFrom
in interface MessageBodyReader<MultiPart>
type
- The class of the object to be read (i.e. MultiPart
.class)genericType
- The type of object to be writtenannotations
- Annotations on the resource method that returned this objectmediaType
- Media type (multipart/*
) of this entityheaders
- Mutable map of HTTP headers for the entire responsestream
- Output stream to which the entity should be written
IOException
- if an I/O error occurs
WebApplicationException
- if an HTTP error response
needs to be produced (only effective if the response is not committed yet)
WebApplicationException
- if the Content-Disposition
header of a multipart/form-data
body part cannot be parsedprotected MultiPart readMultiPart(Class<MultiPart> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String,String> headers, InputStream stream) throws IOException, org.jvnet.mimepull.MIMEParsingException
IOException
org.jvnet.mimepull.MIMEParsingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |