Apache CXF API

org.apache.cxf.jaxrs.ext.multipart
Class Attachment

java.lang.Object
  extended by org.apache.cxf.jaxrs.ext.multipart.Attachment

public class Attachment
extends Object

This class represents an attachment; generally a multipart part. Some constructors in here are intended only for internal use in CXF, others are suitable or preparing attachments to pass to the WebClient API. See the AttachmentBuilder for a convenient way to create attachments for use with WebClient.


Constructor Summary
Attachment(Attachment a, javax.ws.rs.ext.Providers providers)
           
Attachment(InputStream is, javax.ws.rs.core.MultivaluedMap<String,String> headers)
           
Attachment(String id, javax.activation.DataHandler dh, javax.ws.rs.core.MultivaluedMap<String,String> headers)
           
Attachment(String id, javax.activation.DataSource ds, javax.ws.rs.core.MultivaluedMap<String,String> headers)
           
Attachment(String id, InputStream is, ContentDisposition cd)
           
Attachment(String id, String mediaType, Object object)
           
 
Method Summary
 boolean equals(Object o)
           
 ContentDisposition getContentDisposition()
           
 String getContentId()
           
 javax.ws.rs.core.MediaType getContentType()
           
 javax.activation.DataHandler getDataHandler()
           
 String getHeader(String name)
           
 List<String> getHeaderAsList(String name)
           
 javax.ws.rs.core.MultivaluedMap<String,String> getHeaders()
           
 Object getObject()
           
<T> T
getObject(Class<T> cls)
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Attachment

public Attachment(Attachment a,
                  javax.ws.rs.ext.Providers providers)

Attachment

public Attachment(String id,
                  javax.activation.DataHandler dh,
                  javax.ws.rs.core.MultivaluedMap<String,String> headers)

Attachment

public Attachment(String id,
                  javax.activation.DataSource ds,
                  javax.ws.rs.core.MultivaluedMap<String,String> headers)

Attachment

public Attachment(InputStream is,
                  javax.ws.rs.core.MultivaluedMap<String,String> headers)

Attachment

public Attachment(String id,
                  String mediaType,
                  Object object)

Attachment

public Attachment(String id,
                  InputStream is,
                  ContentDisposition cd)
Method Detail

getContentDisposition

public ContentDisposition getContentDisposition()

getContentId

public String getContentId()

getContentType

public javax.ws.rs.core.MediaType getContentType()

getDataHandler

public javax.activation.DataHandler getDataHandler()

getObject

public Object getObject()

getObject

public <T> T getObject(Class<T> cls)

getHeader

public String getHeader(String name)

getHeaderAsList

public List<String> getHeaderAsList(String name)

getHeaders

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

Apache CXF API

Apache CXF