@ConstrainedTo(value=ClientSide.class) public class MultiPartReaderClientSide extends Object implements javax.ws.rs.ext.MessageBodyReader<MultiPart>
Provider
MessageBodyReader
implementation for
MultiPart
entities.
Constructor and Description |
---|
MultiPartReaderClientSide(javax.ws.rs.ext.Providers providers,
MultiPartConfig config)
Accept constructor injection of the configuration parameters for this
application.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isReadable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
MultiPart |
readFrom(Class<MultiPart> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.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,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,String> headers,
InputStream stream) |
protected static javax.ws.rs.core.MediaType |
unquoteMediaTypeParameters(javax.ws.rs.core.MediaType mediaType,
String... parameters) |
public MultiPartReaderClientSide(@Context javax.ws.rs.ext.Providers providers, @Context MultiPartConfig config)
Accept constructor injection of the configuration parameters for this application.
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isReadable
in interface javax.ws.rs.ext.MessageBodyReader<MultiPart>
public MultiPart readFrom(Class<MultiPart> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> headers, InputStream stream) throws IOException, javax.ws.rs.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 javax.ws.rs.ext.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 writtenIOException
- if an I/O error occursjavax.ws.rs.WebApplicationException
- if an HTTP error response
needs to be produced (only effective if the response is not committed yet)javax.ws.rs.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, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> headers, InputStream stream) throws IOException, org.jvnet.mimepull.MIMEParsingException
IOException
org.jvnet.mimepull.MIMEParsingException
protected static javax.ws.rs.core.MediaType unquoteMediaTypeParameters(javax.ws.rs.core.MediaType mediaType, String... parameters)
Copyright © 2013 Oracle Corporation. All rights reserved.