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 |
---|---|
boolean |
equals(Object o) |
String |
getContentType()
get the Content-Type
|
Buffer |
getData()
get the data
|
String |
getDescription()
get the description field
|
String |
getDisposition()
get the disposition field
|
String |
getName()
get the name
|
int |
hashCode() |
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 |
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 JsonObject toJson()
Copyright © 2015. All Rights Reserved.