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(javax.ws.rs.core.GenericType<T> type) |
String |
getBodyAsString() |
javax.ws.rs.core.MultivaluedMap<String,String> |
getHeaders() |
javax.ws.rs.core.MediaType |
getMediaType() |
boolean |
isContentTypeFromMessage() |
void |
setMediaType(javax.ws.rs.core.MediaType mediaType)
Change the media type of the body part before you extract it.
|
public void setMediaType(javax.ws.rs.core.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(javax.ws.rs.core.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 javax.ws.rs.core.MultivaluedMap<String,String> getHeaders()
getHeaders
in interface InputPart
public javax.ws.rs.core.MediaType getMediaType()
getMediaType
in interface InputPart
public boolean isContentTypeFromMessage()
isContentTypeFromMessage
in interface InputPart
Copyright © 2019 JBoss by Red Hat. All rights reserved.