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

java.lang.Object
  extended by org.apache.wink.common.model.multipart.OutPart

public class OutPart
extends Object

This class is used to represent a part in an OutMultiPart message, basically it holds the part headers and body

Author:
elib

Constructor Summary
OutPart()
           
 
Method Summary
 void addHeader(String name, String value)
          add header to the part
 Object getBody()
           
 String getContentType()
           
 javax.ws.rs.core.MultivaluedMap<String,String> getHeaders()
           
 void setBody(Object body)
           
 void setContentType(String contentType)
          Add the content type header
 void setHeaders(javax.ws.rs.core.MultivaluedMap<String,String> headers)
           
 void setLocationHeader(String location)
          set the location header
protected  void writeBody(OutputStream os, javax.ws.rs.ext.Providers providers)
          write the part body to the os stream, the providers might be used to serialize the body
 void writePart(OutputStream os, javax.ws.rs.ext.Providers providers)
          write the entire part to the os stream, the providers might be used to serialize the body
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutPart

public OutPart()
Method Detail

addHeader

public void addHeader(String name,
                      String value)
add header to the part

Parameters:
name -
value -

setContentType

public void setContentType(String contentType)
Add the content type header

Parameters:
contentType -

getContentType

public String getContentType()

setLocationHeader

public void setLocationHeader(String location)
set the location header

Parameters:
location -

writeBody

protected void writeBody(OutputStream os,
                         javax.ws.rs.ext.Providers providers)
                  throws IOException
write the part body to the os stream, the providers might be used to serialize the body

Parameters:
os -
providers -
Throws:
IOException

writePart

public void writePart(OutputStream os,
                      javax.ws.rs.ext.Providers providers)
               throws IOException
write the entire part to the os stream, the providers might be used to serialize the body

Parameters:
os -
providers -
Throws:
IOException

setBody

public void setBody(Object body)

getBody

public Object getBody()

setHeaders

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

getHeaders

public javax.ws.rs.core.MultivaluedMap<String,String> getHeaders()


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