public interface MailAttachment
Modifier and Type | Method and Description |
---|---|
MailAttachment |
addHeader(String key,
String value)
Add an header to this attachment.
|
static MailAttachment |
create()
construct an empty MailAttachment object that can be filled with the
setters
|
static MailAttachment |
create(io.vertx.core.json.JsonObject json)
create a MailAttachment object from a JsonObject representation
|
static MailAttachment |
create(MailAttachment other)
create a copy of a MailAttachment object
|
String |
getContentId()
get the Content-ID field
|
String |
getContentType()
get the Content-Type
|
io.vertx.core.buffer.Buffer |
getData()
get the data
|
String |
getDescription()
get the description field
|
String |
getDisposition()
get the disposition field
|
io.vertx.core.MultiMap |
getHeaders()
Get the headers to be added for this attachment.
|
String |
getName()
get the name
|
int |
getSize()
Gets the size of the attachment.
|
io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer> |
getStream()
Gets the data stream.
|
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(io.vertx.core.buffer.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(io.vertx.core.MultiMap headers)
Set the headers to be added for this attachment.
|
MailAttachment |
setName(String name)
set the name
|
MailAttachment |
setSize(int size)
Sets the size of the attachment.
|
MailAttachment |
setStream(io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer> stream)
Sets the data stream.
|
io.vertx.core.json.JsonObject |
toJson()
convert this object to JSON representation
|
static MailAttachment create()
static MailAttachment create(io.vertx.core.json.JsonObject json)
json
- object to be copiedstatic MailAttachment create(MailAttachment other)
other
- object to be copiedio.vertx.core.buffer.Buffer getData()
MailAttachment setData(io.vertx.core.buffer.Buffer data)
data
- Buffer of bytes to be used at attachmentio.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer> getStream()
MailAttachment setStream(io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer> stream)
stream
- data stream to be used at attachmentint getSize()
MailAttachment setSize(int size)
It is needed when using ReadStream for the MailAttachement.
size
- the size of the attachmentString getName()
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
String getContentType()
MailAttachment setContentType(String contentType)
contentType
- the contentTypeString getDisposition()
MailAttachment setDisposition(String disposition)
disposition
- the dispositionString getDescription()
MailAttachment setDescription(String description)
description
- the descriptionString getContentId()
MailAttachment setContentId(String contentId)
contentId
- the content idMailAttachment addHeader(String key, String value)
key
- the header keyvalue
- the header valueio.vertx.core.MultiMap getHeaders()
MailAttachment setHeaders(io.vertx.core.MultiMap headers)
headers
- the headers to be addedio.vertx.core.json.JsonObject toJson()
Copyright © 2020 Eclipse. All rights reserved.