Interface InputPart
- 
- All Known Implementing Classes:
 MultipartInputImpl.PartImpl
public interface InputPartRepresents one part of a multipart message.- Version:
 - $Revision: 1 $
 - Author:
 - Bill Burke
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_CHARSET_PROPERTYIf there is a content-type header without a charset parameter, charset=US-ASCII is assumed.static StringDEFAULT_CONTENT_TYPE_PROPERTYIf no content-type header is sent in a multipart message part "text/plain; charset=ISO-8859-1" is assumed. 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> TgetBody(Class<T> type, Type genericType)<T> TgetBody(javax.ws.rs.core.GenericType<T> type)StringgetBodyAsString()javax.ws.rs.core.MultivaluedMap<String,String>getHeaders()javax.ws.rs.core.MediaTypegetMediaType()booleanisContentTypeFromMessage()voidsetMediaType(javax.ws.rs.core.MediaType mediaType)Change the media type of the body part before you extract it. 
 - 
 
- 
- 
Field Detail
- 
DEFAULT_CONTENT_TYPE_PROPERTY
static final 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.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 aContainerRequestFilter.- See Also:
 - Constant Field Values
 
 
- 
DEFAULT_CHARSET_PROPERTY
static final String DEFAULT_CHARSET_PROPERTY
If there is a content-type header without a charset parameter, charset=US-ASCII is assumed.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 aContainerRequestFilter.- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
getHeaders
javax.ws.rs.core.MultivaluedMap<String,String> getHeaders()
- Returns:
 - headers of this part
 
 
- 
getBodyAsString
String getBodyAsString() throws IOException
- Throws:
 IOException
 
- 
getBody
<T> T getBody(Class<T> type, Type genericType) throws IOException
- Throws:
 IOException
 
- 
getBody
<T> T getBody(javax.ws.rs.core.GenericType<T> type) throws IOException- Throws:
 IOException
 
- 
getMediaType
javax.ws.rs.core.MediaType getMediaType()
- Returns:
 - "Content-Type" of this part
 
 
- 
isContentTypeFromMessage
boolean isContentTypeFromMessage()
- Returns:
 - true if the Content-Type was resolved from the message, false if it was resolved from the server default
 
 
- 
setMediaType
void setMediaType(javax.ws.rs.core.MediaType mediaType)
Change the media type of the body part before you extract it. Useful for specifying a charset.- Parameters:
 mediaType- media type
 
 - 
 
 -