public class Attachment extends Object implements Transferable
WebClient
API.
See the AttachmentBuilder
for a convenient
way to create attachments for use with WebClient
.Constructor and Description |
---|
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) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
ContentDisposition |
getContentDisposition() |
String |
getContentId() |
javax.ws.rs.core.MediaType |
getContentType() |
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() |
void |
transferTo(File destinationFile) |
public Attachment(Attachment a, javax.ws.rs.ext.Providers providers)
public Attachment(String id, DataHandler dh, javax.ws.rs.core.MultivaluedMap<String,String> headers)
public Attachment(String id, DataSource ds, javax.ws.rs.core.MultivaluedMap<String,String> headers)
public Attachment(InputStream is, javax.ws.rs.core.MultivaluedMap<String,String> headers)
public Attachment(String id, InputStream is, ContentDisposition cd)
public ContentDisposition getContentDisposition()
public String getContentId()
public javax.ws.rs.core.MediaType getContentType()
public DataHandler getDataHandler()
public Object getObject()
public <T> T getObject(Class<T> cls)
public void transferTo(File destinationFile) throws IOException
transferTo
in interface Transferable
IOException
Apache CXF