|
||||||||||
| 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
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 org.glassfish.jersey.media.multipart.BodyPart |
|---|
contentDisposition, messageBodyWorkers |
| Constructor Summary | |
|---|---|
MultiPart()
Instantiates a new MultiPart with a mediaType of
multipart/mixed. |
|
MultiPart(MediaType mediaType)
Instantiates 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,
MediaType mediaType)
Builder pattern method to add a newly configured BodyPart
to this MultiPart. |
void |
cleanup()
Performs 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()
Disables access to the entity for a MultiPart. |
void |
setEntity(java.lang.Object entity)
Disables access to the entity for a MultiPart. |
void |
setMediaType(MediaType mediaType)
Sets the MediaType for this MultiPart. |
MultiPart |
type(MediaType type)
Builder pattern method to return this MultiPart after
additional configuration. |
| 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 MultiPart()
MultiPart with a mediaType of
multipart/mixed.
public MultiPart(MediaType mediaType)
MultiPart with the specified characteristics.
mediaType - the MediaType for this multipart.| Method Detail |
|---|
public java.util.List<BodyPart> getBodyParts()
BodyParts nested in this
MultiPart.
public java.lang.Object getEntity()
MultiPart. Use the list
returned by getBodyParts() to access the relevant
BodyPart instead.
getEntity in class BodyPartjava.lang.IllegalStateException - thrown unconditionally.public void setEntity(java.lang.Object entity)
MultiPart. Use the list
returned by getBodyParts() to access the relevant
BodyPart instead.
setEntity in class BodyPartentity - public void setMediaType(MediaType mediaType)
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 multipart.public MultiPart bodyPart(BodyPart bodyPart)
BodyPart to this
MultiPart.
bodyPart - BodyPart to be added.
public MultiPart bodyPart(java.lang.Object entity,
MediaType mediaType)
BodyPart
to this MultiPart.
entity - entity object for this body part.mediaType - content type for this body part.public BodyPart entity(java.lang.Object entity)
MultiPart to throw
IllegalArgumentException.
entity in class BodyPartentity - entity to set for this BodyPart.public MultiPart type(MediaType type)
MultiPart after
additional configuration.
type in class BodyParttype - media type to set for this MultiPart.public void cleanup()
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 | |||||||||