org.apache.cxf.jaxrs.ext.multipart
Class Attachment
java.lang.Object
org.apache.cxf.jaxrs.ext.multipart.Attachment
- All Implemented Interfaces:
- Transferable
public class Attachment
- extends Object
- implements Transferable
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(javax.ws.rs.core.MultivaluedMap<String,String> headers,
Object object)
|
Attachment(String id,
DataHandler dh,
javax.ws.rs.core.MultivaluedMap<String,String> headers)
|
Attachment(String id,
DataSource ds,
javax.ws.rs.core.MultivaluedMap<String,String> headers)
|
Attachment(String id,
InputStream is,
ContentDisposition cd)
|
Attachment(String id,
String mediaType,
Object object)
|
Attachment
public Attachment(Attachment a,
javax.ws.rs.ext.Providers providers)
Attachment
public Attachment(String id,
DataHandler dh,
javax.ws.rs.core.MultivaluedMap<String,String> headers)
Attachment
public Attachment(String id,
DataSource ds,
javax.ws.rs.core.MultivaluedMap<String,String> headers)
Attachment
public Attachment(javax.ws.rs.core.MultivaluedMap<String,String> headers,
Object object)
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)
getContentDisposition
public ContentDisposition getContentDisposition()
getContentId
public String getContentId()
getContentType
public javax.ws.rs.core.MediaType getContentType()
getDataHandler
public 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()
transferTo
public void transferTo(File destinationFile)
throws IOException
- Specified by:
transferTo
in interface Transferable
- Throws:
IOException
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
Apache CXF