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

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

public class OutPart
extends java.lang.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(java.lang.String name, java.lang.String value)
          add header to the part
 java.lang.Object getBody()
           
 java.lang.String getContentType()
           
 javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> getHeaders()
           
 void setBody(java.lang.Object body)
           
 void setContentType(java.lang.String contentType)
          Add the content type header
 void setHeaders(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> headers)
           
 void setLocationHeader(java.lang.String location)
          set the location header
protected  void writeBody(java.io.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(java.io.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(java.lang.String name,
                      java.lang.String value)
add header to the part

Parameters:
name -
value -

setContentType

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

Parameters:
contentType -

getContentType

public java.lang.String getContentType()

setLocationHeader

public void setLocationHeader(java.lang.String location)
set the location header

Parameters:
location -

writeBody

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

Parameters:
os -
providers -
Throws:
java.io.IOException

writePart

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

Parameters:
os -
providers -
Throws:
java.io.IOException

setBody

public void setBody(java.lang.Object body)

getBody

public java.lang.Object getBody()

setHeaders

public 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()


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