Class MultipartInputImpl.PartImpl
java.lang.Object
org.jboss.resteasy.plugins.providers.multipart.MultipartInputImpl.PartImpl
- All Implemented Interfaces:
InputPart
- Enclosing class:
MultipartInputImpl
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Field Summary
Fields inherited from interface org.jboss.resteasy.plugins.providers.multipart.InputPart
DEFAULT_CHARSET_PROPERTY, DEFAULT_CONTENT_TYPE_PROPERTY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetBody()
Returns the body content as an input stream.<T> T
getBody
(jakarta.ws.rs.core.GenericType<T> type) <T> T
Returns the filename parameter of the content disposition of this Entity.jakarta.ws.rs.core.MediaType
boolean
void
setMediaType
(jakarta.ws.rs.core.MediaType mediaType) Change the media type of the body part before you extract it.
-
Constructor Details
-
PartImpl
public PartImpl(org.apache.james.mime4j.message.BodyPart bodyPart)
-
-
Method Details
-
setMediaType
public void setMediaType(jakarta.ws.rs.core.MediaType mediaType) Description copied from interface:InputPart
Change the media type of the body part before you extract it. Useful for specifying a charset.- Specified by:
setMediaType
in interfaceInputPart
- Parameters:
mediaType
- media type
-
getBody
- Specified by:
getBody
in interfaceInputPart
- Throws:
IOException
-
getBody
- Specified by:
getBody
in interfaceInputPart
- Throws:
IOException
-
getBody
Description copied from interface:InputPart
Returns the body content as an input stream.- Specified by:
getBody
in interfaceInputPart
- Returns:
- the body content
- Throws:
IOException
- if an error occurs reading the content
-
getBodyAsString
- Specified by:
getBodyAsString
in interfaceInputPart
- Throws:
IOException
-
getFileName
Description copied from interface:InputPart
Returns the filename parameter of the content disposition of this Entity.- Specified by:
getFileName
in interfaceInputPart
- Returns:
- the filename or
null
if one does not exist
-
getHeaders
- Specified by:
getHeaders
in interfaceInputPart
- Returns:
- headers of this part
-
getMediaType
public jakarta.ws.rs.core.MediaType getMediaType()- Specified by:
getMediaType
in interfaceInputPart
- Returns:
- "Content-Type" of this part
-
isContentTypeFromMessage
public boolean isContentTypeFromMessage()- Specified by:
isContentTypeFromMessage
in interfaceInputPart
- Returns:
- true if the Content-Type was resolved from the message, false if it was resolved from the server default
-