public interface InputPart
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_CHARSET_PROPERTY
If there is a content-type header without a charset parameter, charset=US-ASCII
is assumed.
|
static String |
DEFAULT_CONTENT_TYPE_PROPERTY
If no content-type header is sent in a multipart message part
"text/plain; charset=ISO-8859-1" is assumed.
|
Modifier and Type | Method and Description |
---|---|
<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.
|
static final String DEFAULT_CONTENT_TYPE_PROPERTY
This can be overwritten by setting a different String value in
HttpRequest.setAttribute(String, Object)
with this ("resteasy.provider.multipart.inputpart.defaultContentType")
String as key. It should be done in a
ContainerRequestFilter
.
static final String DEFAULT_CHARSET_PROPERTY
This can be overwritten by setting a different String value in
HttpRequest.setAttribute(String, Object)
with this ("resteasy.provider.multipart.inputpart.defaultCharset")
String as key. It should be done in a
ContainerRequestFilter
.
MultivaluedMap<String,String> getHeaders()
String getBodyAsString() throws IOException
IOException
<T> T getBody(Class<T> type, Type genericType) throws IOException
IOException
<T> T getBody(GenericType<T> type) throws IOException
IOException
MediaType getMediaType()
boolean isContentTypeFromMessage()
void setMediaType(MediaType mediaType)
mediaType
- media typeCopyright © 2021 JBoss by Red Hat. All rights reserved.