|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.jersey.media.multipart.BodyPart
org.glassfish.jersey.media.multipart.MultiPart
org.glassfish.jersey.media.multipart.FormDataMultiPart
public class FormDataMultiPart
Subclass of MultiPart with specialized support for media type multipart/form-data. See
RFC 2388 for the formal definition of this media type.
multipart/form-data message, the following features
are provided:
FormDataMultiPart, enabling access to the specialized methods.FormDataBodyPart, enabling access to its specialized methods.FormDataBodyPart for a specified control name.Map of FormDataBodyParts for all fields, keyed by field name.multipart/form-data message, the following features
are provided:
FormDataMultiPart instance will automatically set to multipart/form-data.text/plain.multipart/mixed body part to contain multiple uploaded files.
| Field Summary |
|---|
| Fields inherited from class org.glassfish.jersey.media.multipart.BodyPart |
|---|
contentDisposition, messageBodyWorkers |
| Constructor Summary | |
|---|---|
FormDataMultiPart()
Instantiates a new FormDataMultiPart instance with
default characteristics. |
|
| Method Summary | |
|---|---|
FormDataMultiPart |
field(String name,
Object entity,
javax.ws.rs.core.MediaType mediaType)
Builder pattern method to add a named field with an arbitrary media type and entity, and return this instance. |
FormDataMultiPart |
field(String name,
String value)
Builder pattern method to add a named field with a text value, and return this instance. |
FormDataBodyPart |
getField(String name)
Gets a form data body part given a control name. |
Map<String,List<FormDataBodyPart>> |
getFields()
Gets a map of form data body parts where the key is the control name and the value is a list of one or more form data body parts. |
List<FormDataBodyPart> |
getFields(String name)
Gets a list of one or more form data body parts given a control name. |
void |
setMediaType(javax.ws.rs.core.MediaType mediaType)
Disables changing the media type to anything other than multipart/form-data. |
| Methods inherited from class org.glassfish.jersey.media.multipart.MultiPart |
|---|
bodyPart, bodyPart, cleanup, close, entity, getBodyParts, getEntity, setEntity, type |
| Methods inherited from class org.glassfish.jersey.media.multipart.BodyPart |
|---|
contentDisposition, getContentDisposition, getEntityAs, getHeaders, getMediaType, getParameterizedHeaders, getParent, getProviders, setContentDisposition, setMessageBodyWorkers, setParent, setProviders |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FormDataMultiPart()
FormDataMultiPart instance with
default characteristics.
| Method Detail |
|---|
public FormDataMultiPart field(String name,
String value)
name - the control name.value - the text value.
public FormDataMultiPart field(String name,
Object entity,
javax.ws.rs.core.MediaType mediaType)
name - the control name.entity - entity value for the new field.mediaType - media type for the new field.
public FormDataBodyPart getField(String name)
name - the control name.
public List<FormDataBodyPart> getFields(String name)
name - the control name.
public Map<String,List<FormDataBodyPart>> getFields()
public void setMediaType(javax.ws.rs.core.MediaType mediaType)
multipart/form-data.
setMediaType in class MultiPartmediaType - the proposed media type.
IllegalArgumentException - if the proposed media type is not multipart/form-data.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||