public class MailAttachment extends Object
Constructor and Description |
---|
MailAttachment()
construct an empty MailAttachment object that can be filled with the
setters
|
MailAttachment(JsonObject json)
create a MailAttachment object from a JsonObject representation
|
MailAttachment(MailAttachment other)
create a copy of a MailAttachment object
|
Modifier and Type | Method and Description |
---|---|
MailAttachment |
addHeader(String key,
String value)
Add an header to this attachment.
|
boolean |
equals(Object o) |
String |
getContentId()
get the Content-ID field
|
String |
getContentType()
get the Content-Type
|
Buffer |
getData()
get the data
|
String |
getDescription()
get the description field
|
String |
getDisposition()
get the disposition field
|
MultiMap |
getHeaders()
Get the headers to be added for this attachment.
|
String |
getName()
get the name
|
int |
hashCode() |
MailAttachment |
setContentId(String contentId)
set the Content-ID field to be used in the attachment
|
MailAttachment |
setContentType(String contentType)
set the Content-Type
|
MailAttachment |
setData(Buffer data)
set the data
|
MailAttachment |
setDescription(String description)
set the description field to be used in the attachment
|
MailAttachment |
setDisposition(String disposition)
set the disposition field to be used in the attachment
|
MailAttachment |
setHeaders(MultiMap headers)
Set the headers to be added for this attachment.
|
MailAttachment |
setName(String name)
set the name
|
JsonObject |
toJson()
convert this object to JSON representation
|
public MailAttachment()
public MailAttachment(MailAttachment other)
other
- object to be copiedpublic MailAttachment(JsonObject json)
json
- object to be copiedpublic Buffer getData()
public MailAttachment setData(Buffer data)
data
- Buffer of bytes to be used at attachmentpublic String getName()
public MailAttachment setName(String name)
name
- name of the attachment filename is the descriptive filename that will be put into the mail i.e. usually a local filename without path this can be set to "" to omit the filename attribute
public String getContentType()
public MailAttachment setContentType(String contentType)
contentType
- the contentTypepublic String getDisposition()
public MailAttachment setDisposition(String disposition)
disposition
- the dispositionpublic String getDescription()
public MailAttachment setDescription(String description)
description
- the descriptionpublic String getContentId()
public MailAttachment setContentId(String contentId)
contentId
- the content idpublic MailAttachment addHeader(String key, String value)
key
- the header keyvalue
- the header valuepublic MultiMap getHeaders()
public MailAttachment setHeaders(MultiMap headers)
headers
- the headers to be addedpublic JsonObject toJson()
Copyright © 2023 Eclipse. All rights reserved.