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()
Attachment
getDataHandler
in interface Attachment
public String getHeader(String name)
Attachment
getHeader
in interface Attachment
name
- he name of this headerpublic List<String> getHeaderAsList(String name)
Attachment
getHeaderAsList
in interface Attachment
name
- The name of this headerpublic void addHeader(String headerName, String headerValue)
Attachment
addHeader
in interface Attachment
headerName
- the name of this headerheaderValue
- the value for this headerpublic void setHeader(String headerName, String headerValue)
Attachment
setHeader
in interface Attachment
headerName
- the name of this headerheaderValue
- the value for this headerpublic void removeHeader(String headerName)
Attachment
removeHeader
in interface Attachment
headerName
- the name of this headerpublic Collection<String> getHeaderNames()
Attachment
getHeaderNames
in interface Attachment
public void clearHeaders()
Apache Camel