org.apache.wink.common.model.multipart
Class InPart

java.lang.Object
  extended by org.apache.wink.common.model.multipart.InPart
Direct Known Subclasses:
BufferedInPart

public class InPart
extends Object

This class is used to represent a single part in an inbound MultiPart messages,

See Also:
InMultiPart

Constructor Summary
InPart()
           
InPart(javax.ws.rs.core.MultivaluedMap<String,String> headers, javax.ws.rs.ext.Providers providers)
           
 
Method Summary
<T> T
getBody(Class<T> type, Type genericType)
          This method is used for deserialization of the part stream.
<T> T
getBody(Class<T> type, Type genericType, javax.ws.rs.ext.Providers providers)
          This method is used for deserialization of the part stream to a object using the given providers.
 String getContentType()
           
 javax.ws.rs.core.MultivaluedMap<String,String> getHeaders()
          Get the part's headers
 Set<String> getHeadersName()
           
 InputStream getInputStream()
           
 javax.ws.rs.ext.Providers getProviders()
          get the providers that are used by the @see InPart#getBody(Class, Type) method for deserialization of the part
protected  void setHeaders(javax.ws.rs.core.MultivaluedMap<String,String> headers)
           
protected  void setInputStream(InputStream inputStream)
           
 void setProviders(javax.ws.rs.ext.Providers providers)
          set the providers to be used by the @see InPart#getBody(Class, Type) method for deserialization of the part
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InPart

public InPart()

InPart

public InPart(javax.ws.rs.core.MultivaluedMap<String,String> headers,
              javax.ws.rs.ext.Providers providers)
Method Detail

getProviders

public javax.ws.rs.ext.Providers getProviders()
get the providers that are used by the @see InPart#getBody(Class, Type) method for deserialization of the part

Returns:

setProviders

public void setProviders(javax.ws.rs.ext.Providers providers)
set the providers to be used by the @see InPart#getBody(Class, Type) method for deserialization of the part


setInputStream

protected void setInputStream(InputStream inputStream)

getInputStream

public InputStream getInputStream()

setHeaders

protected void setHeaders(javax.ws.rs.core.MultivaluedMap<String,String> headers)

getHeaders

public javax.ws.rs.core.MultivaluedMap<String,String> getHeaders()
Get the part's headers

Returns:

getContentType

public String getContentType()

getHeadersName

public Set<String> getHeadersName()

getBody

public <T> T getBody(Class<T> type,
                     Type genericType,
                     javax.ws.rs.ext.Providers providers)
          throws IOException
This method is used for deserialization of the part stream to a object using the given providers.

Type Parameters:
T -
Parameters:
type -
genericType -
providers -
Returns:
Throws:
IOException

getBody

public <T> T getBody(Class<T> type,
                     Type genericType)
          throws IOException
This method is used for deserialization of the part stream. It make a usage of its providers data member for the deserialization

Throws:
IOException


Copyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.