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 java.lang.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<java.lang.String,java.lang.String> headers, javax.ws.rs.ext.Providers providers)
           
 
Method Summary
<T> T
getBody(java.lang.Class<T> type, java.lang.reflect.Type genericType)
          This method is used for deserialization of the part stream.
<T> T
getBody(java.lang.Class<T> type, java.lang.reflect.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.
 java.lang.String getContentType()
           
 javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> getHeaders()
          Get the part's headers
 java.util.Set<java.lang.String> getHeadersName()
           
 java.io.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<java.lang.String,java.lang.String> headers)
           
protected  void setInputStream(java.io.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<java.lang.String,java.lang.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(java.io.InputStream inputStream)

getInputStream

public java.io.InputStream getInputStream()

setHeaders

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

getHeaders

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

Returns:

getContentType

public java.lang.String getContentType()

getHeadersName

public java.util.Set<java.lang.String> getHeadersName()

getBody

public <T> T getBody(java.lang.Class<T> type,
                     java.lang.reflect.Type genericType,
                     javax.ws.rs.ext.Providers providers)
          throws java.io.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:
java.io.IOException

getBody

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

Throws:
java.io.IOException


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