public class MultipartInputImpl.PartImpl extends Object implements InputPart
DEFAULT_CHARSET_PROPERTY, DEFAULT_CONTENT_TYPE_PROPERTY
Constructor and Description |
---|
PartImpl(org.apache.james.mime4j.message.BodyPart bodyPart) |
Modifier and Type | Method and Description |
---|---|
InputStream |
getBody() |
<T> T |
getBody(Class<T> type,
Type genericType) |
<T> T |
getBody(GenericType<T> type) |
String |
getBodyAsString() |
MultivaluedMap<String,String> |
getHeaders() |
MediaType |
getMediaType() |
boolean |
isContentTypeFromMessage() |
void |
setMediaType(MediaType mediaType)
Change the media type of the body part before you extract it.
|
public void setMediaType(MediaType mediaType)
InputPart
setMediaType
in interface InputPart
mediaType
- media typepublic <T> T getBody(Class<T> type, Type genericType) throws IOException
getBody
in interface InputPart
IOException
public <T> T getBody(GenericType<T> type) throws IOException
getBody
in interface InputPart
IOException
public InputStream getBody() throws IOException
IOException
public String getBodyAsString() throws IOException
getBodyAsString
in interface InputPart
IOException
public MultivaluedMap<String,String> getHeaders()
getHeaders
in interface InputPart
public MediaType getMediaType()
getMediaType
in interface InputPart
public boolean isContentTypeFromMessage()
isContentTypeFromMessage
in interface InputPart
Copyright © 2021 JBoss by Red Hat. All rights reserved.