|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.jersey.multipart.BodyPart
com.sun.jersey.multipart.MultiPart
public class MultiPart
A mutable model representing a MIME MultiPart entity. This class extends
BodyPart because MultiPart entities can be nested inside other
MultiPart entities to an arbitrary depth.
| Field Summary |
|---|
| Fields inherited from class com.sun.jersey.multipart.BodyPart |
|---|
cd |
| Constructor Summary | |
|---|---|
MultiPart()
Instantiate a new MultiPart with a mediaType of
multipart/mixed. |
|
MultiPart(javax.ws.rs.core.MediaType mediaType)
Instantiate a new MultiPart with the specified characteristics. |
|
| Method Summary | |
|---|---|
MultiPart |
bodyPart(BodyPart bodyPart)
Builder pattern method to add the specified BodyPart to this
MultiPart. |
MultiPart |
bodyPart(java.lang.Object entity,
javax.ws.rs.core.MediaType mediaType)
Builder pattern method to add a newly configured BodyPart
to this MultiPart. |
void |
cleanup()
Perform any necessary cleanup at the end of processing this MultiPart. |
void |
close()
|
BodyPart |
entity(java.lang.Object entity)
Override the entity set operation on a MultiPart to throw
IllegalArgumentException. |
java.util.List<BodyPart> |
getBodyParts()
Return a mutable list of BodyParts nested in this
MultiPart. |
java.lang.Object |
getEntity()
Disable access to the entity for a MultiPart. |
void |
setEntity(java.lang.Object entity)
Disable access to the entity for a MultiPart. |
void |
setMediaType(javax.ws.rs.core.MediaType mediaType)
Set the MediaType for this MultiPart. |
MultiPart |
type(javax.ws.rs.core.MediaType type)
Builder pattern method to return this MultiPart after
additional configuration. |
| Methods inherited from class com.sun.jersey.multipart.BodyPart |
|---|
contentDisposition, getContentDisposition, getEntityAs, getHeaders, getMediaType, getParameterizedHeaders, getParent, getProviders, setContentDisposition, setParent, setProviders |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MultiPart()
Instantiate a new MultiPart with a mediaType of
multipart/mixed.
public MultiPart(javax.ws.rs.core.MediaType mediaType)
Instantiate a new MultiPart with the specified characteristics.
mediaType - The MediaType for this multipart| Method Detail |
|---|
public java.util.List<BodyPart> getBodyParts()
public java.lang.Object getEntity()
Disable access to the entity for a MultiPart. Use the list
returned by getBodyParts() to access the relevant
BodyPart instead.
getEntity in class BodyPartjava.lang.IllegalStateException - thrown unconditionallypublic void setEntity(java.lang.Object entity)
Disable access to the entity for a MultiPart. Use the list
returned by getBodyParts() to access the relevant
BodyPart instead.
setEntity in class BodyPartentity - public void setMediaType(javax.ws.rs.core.MediaType mediaType)
Set the MediaType for this MultiPart. If never set,
the default MediaType MUST be multipart/mixed.
setMediaType in class BodyPartmediaType - The new MediaType
java.lang.IllegalArgumentException - if the type property
is not set to multipartpublic MultiPart bodyPart(BodyPart bodyPart)
Builder pattern method to add the specified BodyPart to this
MultiPart.
bodyPart - BodyPart to be added
public MultiPart bodyPart(java.lang.Object entity,
javax.ws.rs.core.MediaType mediaType)
Builder pattern method to add a newly configured BodyPart
to this MultiPart.
entity - Entity object for this body partmediaType - Content type for this body partpublic BodyPart entity(java.lang.Object entity)
Override the entity set operation on a MultiPart to throw
IllegalArgumentException.
entity in class BodyPartentity - Entity to set for this BodyPartpublic MultiPart type(javax.ws.rs.core.MediaType type)
Builder pattern method to return this MultiPart after
additional configuration.
type in class BodyParttype - Media type to set for this MultiPartpublic void cleanup()
Perform any necessary cleanup at the end of processing this
MultiPart.
cleanup in class BodyPart
public void close()
throws java.io.IOException
close in interface java.io.Closeablejava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||