public class MultiPart extends BodyPart implements Closeable
BodyPart because MultiPart entities can be nested inside other
 MultiPart entities to an arbitrary depth.contentDisposition, messageBodyWorkers| Constructor and Description | 
|---|
MultiPart()
 | 
MultiPart(jakarta.ws.rs.core.MediaType mediaType)
Instantiates a new  
MultiPart with the specified characteristics. | 
| Modifier and Type | Method and Description | 
|---|---|
MultiPart | 
bodyPart(BodyPart bodyPart)
 | 
MultiPart | 
bodyPart(Object entity,
        jakarta.ws.rs.core.MediaType mediaType)
 | 
void | 
cleanup()
Performs any necessary cleanup at the end of processing this
  
MultiPart. | 
void | 
close()  | 
BodyPart | 
entity(Object entity)
Override the entity set operation on a  
MultiPart to throw
 IllegalArgumentException. | 
List<BodyPart> | 
getBodyParts()
 | 
Object | 
getEntity()
Disables access to the entity for a  
MultiPart. | 
void | 
setEntity(Object entity)
Disables access to the entity for a  
MultiPart. | 
void | 
setMediaType(jakarta.ws.rs.core.MediaType mediaType)
Sets the  
MediaType for this MultiPart. | 
MultiPart | 
type(jakarta.ws.rs.core.MediaType type)
Builder pattern method to return this  
MultiPart after
 additional configuration. | 
contentDisposition, getContentDisposition, getEntityAs, getHeaders, getMediaType, getParameterizedHeaders, getParent, getProviders, setContentDisposition, setMessageBodyWorkers, setParent, setProviderspublic MultiPart()
public MultiPart(jakarta.ws.rs.core.MediaType mediaType)
MultiPart with the specified characteristics.mediaType - the MediaType for this multipart.public Object getEntity()
MultiPart. Use the list
 returned by getBodyParts() to access the relevant
 BodyPart instead.getEntity in class BodyPartIllegalStateException - thrown unconditionally.public void setEntity(Object entity)
public void setMediaType(jakarta.ws.rs.core.MediaType mediaType)
setMediaType in class BodyPartmediaType - the new MediaType.IllegalArgumentException - if the type property is not set to multipart.public MultiPart bodyPart(Object entity, jakarta.ws.rs.core.MediaType mediaType)
entity - entity object for this body part.mediaType - content type for this body part.public BodyPart entity(Object entity)
MultiPart to throw
 IllegalArgumentException.public MultiPart type(jakarta.ws.rs.core.MediaType type)
MultiPart after
 additional configuration.public void cleanup()
MultiPart.public void close()
           throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2007-2021, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.