public class DefaultAttachment extends Object implements Attachment
| Constructor and Description |
|---|
DefaultAttachment(DataHandler dh) |
DefaultAttachment(DataSource ds) |
| Modifier and Type | Method and Description |
|---|---|
void |
addHeader(String headerName,
String headerValue)
Add this value to the existing values for this headerName.
|
void |
clearHeaders() |
boolean |
equals(Object other) |
DataHandler |
getDataHandler()
Return a DataHandler for the content within this attachment.
|
String |
getHeader(String name)
Get all the headers for this header name.
|
List<String> |
getHeaderAsList(String name)
Get all the headers for this header name.
|
Collection<String> |
getHeaderNames()
Get all header names for this attachment.
|
int |
hashCode() |
void |
removeHeader(String headerName)
Remove all headers with this name.
|
void |
setHeader(String headerName,
String headerValue)
Set the value for this headerName.
|
public DefaultAttachment(DataHandler dh)
public DefaultAttachment(DataSource ds)
public DataHandler getDataHandler()
AttachmentgetDataHandler in interface Attachmentpublic String getHeader(String name)
AttachmentgetHeader in interface Attachmentname - he name of this headerpublic List<String> getHeaderAsList(String name)
AttachmentgetHeaderAsList in interface Attachmentname - The name of this headerpublic void addHeader(String headerName, String headerValue)
AttachmentaddHeader in interface AttachmentheaderName - the name of this headerheaderValue - the value for this headerpublic void setHeader(String headerName, String headerValue)
AttachmentsetHeader in interface AttachmentheaderName - the name of this headerheaderValue - the value for this headerpublic void removeHeader(String headerName)
AttachmentremoveHeader in interface AttachmentheaderName - the name of this headerpublic Collection<String> getHeaderNames()
AttachmentgetHeaderNames in interface Attachmentpublic void clearHeaders()
Apache Camel