org.jboss.resteasy.plugins.providers.multipart
Class MultipartInputImpl.PartImpl

java.lang.Object
  extended by org.jboss.resteasy.plugins.providers.multipart.MultipartInputImpl.PartImpl
All Implemented Interfaces:
InputPart
Enclosing class:
MultipartInputImpl

public class MultipartInputImpl.PartImpl
extends Object
implements InputPart


Field Summary
 
Fields inherited from interface org.jboss.resteasy.plugins.providers.multipart.InputPart
DEFAULT_CHARSET_PROPERTY, DEFAULT_CONTENT_TYPE_PROPERTY
 
Constructor Summary
MultipartInputImpl.PartImpl(org.apache.james.mime4j.message.BodyPart bodyPart)
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultipartInputImpl.PartImpl

public MultipartInputImpl.PartImpl(org.apache.james.mime4j.message.BodyPart bodyPart)
Method Detail

setMediaType

public void setMediaType(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 interface InputPart

getBody

public <T> T getBody(Class<T> type,
                     Type genericType)
          throws IOException
Specified by:
getBody in interface InputPart
Throws:
IOException

getBody

public <T> T getBody(GenericType<T> type)
          throws IOException
Specified by:
getBody in interface InputPart
Throws:
IOException

getBody

public InputStream getBody()
                    throws IOException
Throws:
IOException

getBodyAsString

public String getBodyAsString()
                       throws IOException
Specified by:
getBodyAsString in interface InputPart
Throws:
IOException

getHeaders

public MultivaluedMap<String,String> getHeaders()
Specified by:
getHeaders in interface InputPart
Returns:
headers of this part

getMediaType

public MediaType getMediaType()
Specified by:
getMediaType in interface InputPart
Returns:
"Content-Type" of this part

isContentTypeFromMessage

public boolean isContentTypeFromMessage()
Specified by:
isContentTypeFromMessage in interface InputPart
Returns:
true if the Content-Type was resolved from the message, false if it was resolved from the server default


Copyright © 2013. All Rights Reserved.