Modifier and Type | Method and Description |
---|---|
static AddressListField |
addressList(String fieldName,
Iterable<? extends Address> addresses)
Creates an address-list field from the specified field name and mailbox
or group addresses.
|
static AddressListField |
bcc(Address... addresses)
Creates a Bcc field for the specified mailbox or group addresses.
|
static AddressListField |
bcc(Address address)
Creates a Bcc field for the specified mailbox or group address.
|
static AddressListField |
bcc(Iterable<Address> addresses)
Creates a Bcc field for the specified mailbox or group addresses.
|
static AddressListField |
cc(Address... addresses)
Creates a Cc field for the specified mailbox or group addresses.
|
static AddressListField |
cc(Address address)
Creates a Cc field for the specified mailbox or group address.
|
static AddressListField |
cc(Iterable<Address> addresses)
Creates a Cc field for the specified mailbox or group addresses.
|
static ContentDispositionField |
contentDisposition(String contentDisposition)
Creates a Content-Disposition field from the specified raw field
value.
|
static ContentDispositionField |
contentDisposition(String dispositionType,
Map<String,String> parameters)
Creates a Content-Disposition field from the specified
disposition type and parameters.
|
static ContentDispositionField |
contentDisposition(String dispositionType,
String filename)
Creates a Content-Disposition field from the specified
disposition type and filename.
|
static ContentDispositionField |
contentDisposition(String dispositionType,
String filename,
long size)
Creates a Content-Disposition field from the specified values.
|
static ContentDispositionField |
contentDisposition(String dispositionType,
String filename,
long size,
Date creationDate,
Date modificationDate,
Date readDate)
Creates a Content-Disposition field from the specified values.
|
static ContentTransferEncodingField |
contentTransferEncoding(String contentTransferEncoding)
Creates a Content-Transfer-Encoding field from the specified raw
field value.
|
static ContentTypeField |
contentType(String contentType)
Creates a Content-Type field from the specified raw field value.
|
static ContentTypeField |
contentType(String mimeType,
Map<String,String> parameters)
Creates a Content-Type field from the specified MIME type and
parameters.
|
static DateTimeField |
date(Date date)
Creates a Date field from the specified
Date
value. |
static DateTimeField |
date(String fieldName,
Date date)
Creates a date field from the specified field name and
Date
value. |
static DateTimeField |
date(String fieldName,
Date date,
TimeZone zone)
Creates a date field from the specified field name,
Date
and TimeZone values. |
static MailboxListField |
from(Iterable<Mailbox> mailboxes)
Creates a From field for the specified mailbox addresses.
|
static MailboxListField |
from(Mailbox... mailboxes)
Creates a From field for the specified mailbox addresses.
|
static MailboxListField |
from(Mailbox mailbox)
Creates a From field for the specified mailbox address.
|
static MailboxField |
mailbox(String fieldName,
Mailbox mailbox)
Creates a mailbox field from the specified field name and mailbox
address.
|
static MailboxListField |
mailboxList(String fieldName,
Iterable<Mailbox> mailboxes)
Creates a mailbox-list field from the specified field name and mailbox
addresses.
|
static UnstructuredField |
messageId(String hostname)
Creates a Message-ID field for the specified host name.
|
static AddressListField |
replyTo(Address... addresses)
Creates a Reply-To field for the specified mailbox or group
addresses.
|
static AddressListField |
replyTo(Address address)
Creates a Reply-To field for the specified mailbox or group
address.
|
static AddressListField |
replyTo(Iterable<Address> addresses)
Creates a Reply-To field for the specified mailbox or group
addresses.
|
static MailboxField |
sender(Mailbox mailbox)
Creates a Sender field for the specified mailbox address.
|
static UnstructuredField |
subject(String subject)
Creates a Subject field from the specified string value.
|
static AddressListField |
to(Address... addresses)
Creates a To field for the specified mailbox or group addresses.
|
static AddressListField |
to(Address address)
Creates a To field for the specified mailbox or group address.
|
static AddressListField |
to(Iterable<Address> addresses)
Creates a To field for the specified mailbox or group addresses.
|
public static ContentTypeField contentType(String contentType)
contentType
- raw content type containing a MIME type and optional
parameters.public static ContentTypeField contentType(String mimeType, Map<String,String> parameters)
mimeType
- a MIME type (such as "text/plain"
or
"application/octet-stream"
).parameters
- map containing content-type parameters such as
"boundary"
.public static ContentTransferEncodingField contentTransferEncoding(String contentTransferEncoding)
contentTransferEncoding
- an encoding mechanism such as "7-bit"
or "quoted-printable"
.public static ContentDispositionField contentDisposition(String contentDisposition)
contentDisposition
- raw content disposition containing a disposition type and
optional parameters.public static ContentDispositionField contentDisposition(String dispositionType, Map<String,String> parameters)
dispositionType
- a disposition type (usually "inline"
or "attachment"
).parameters
- map containing disposition parameters such as
"filename"
.public static ContentDispositionField contentDisposition(String dispositionType, String filename)
dispositionType
- a disposition type (usually "inline"
or "attachment"
).filename
- filename parameter value or null
if the
parameter should not be included.public static ContentDispositionField contentDisposition(String dispositionType, String filename, long size)
dispositionType
- a disposition type (usually "inline"
or "attachment"
).filename
- filename parameter value or null
if the
parameter should not be included.size
- size parameter value or -1
if the parameter
should not be included.public static ContentDispositionField contentDisposition(String dispositionType, String filename, long size, Date creationDate, Date modificationDate, Date readDate)
dispositionType
- a disposition type (usually "inline"
or "attachment"
).filename
- filename parameter value or null
if the
parameter should not be included.size
- size parameter value or -1
if the parameter
should not be included.creationDate
- creation-date parameter value or null
if the
parameter should not be included.modificationDate
- modification-date parameter value or null
if
the parameter should not be included.readDate
- read-date parameter value or null
if the
parameter should not be included.public static DateTimeField date(Date date)
Date
value. The default time zone of the host is used to format the date.date
- date value for the header field.public static DateTimeField date(String fieldName, Date date)
Date
value. The default time zone of the host is used to format the date.fieldName
- a field name such as Date
or
Resent-Date
.date
- date value for the header field.public static DateTimeField date(String fieldName, Date date, TimeZone zone)
Date
and TimeZone
values.fieldName
- a field name such as Date
or
Resent-Date
.date
- date value for the header field.zone
- the time zone to be used for formatting the date.public static UnstructuredField messageId(String hostname)
hostname
- host name to be included in the message ID or
null
if no host name should be included.public static UnstructuredField subject(String subject)
subject
- the subject string.public static MailboxField sender(Mailbox mailbox)
mailbox
- address to be included in the field.public static MailboxListField from(Mailbox mailbox)
mailbox
- address to be included in the field.public static MailboxListField from(Mailbox... mailboxes)
mailboxes
- addresses to be included in the field.public static MailboxListField from(Iterable<Mailbox> mailboxes)
mailboxes
- addresses to be included in the field.public static AddressListField to(Address address)
address
- mailbox or group address to be included in the field.public static AddressListField to(Address... addresses)
addresses
- mailbox or group addresses to be included in the field.public static AddressListField to(Iterable<Address> addresses)
addresses
- mailbox or group addresses to be included in the field.public static AddressListField cc(Address address)
address
- mailbox or group address to be included in the field.public static AddressListField cc(Address... addresses)
addresses
- mailbox or group addresses to be included in the field.public static AddressListField cc(Iterable<Address> addresses)
addresses
- mailbox or group addresses to be included in the field.public static AddressListField bcc(Address address)
address
- mailbox or group address to be included in the field.public static AddressListField bcc(Address... addresses)
addresses
- mailbox or group addresses to be included in the field.public static AddressListField bcc(Iterable<Address> addresses)
addresses
- mailbox or group addresses to be included in the field.public static AddressListField replyTo(Address address)
address
- mailbox or group address to be included in the field.public static AddressListField replyTo(Address... addresses)
addresses
- mailbox or group addresses to be included in the field.public static AddressListField replyTo(Iterable<Address> addresses)
addresses
- mailbox or group addresses to be included in the field.public static MailboxField mailbox(String fieldName, Mailbox mailbox)
Sender
and
Resent-Sender
.fieldName
- the name of the mailbox field (Sender
or
Resent-Sender
).mailbox
- mailbox address for the field value.public static MailboxListField mailboxList(String fieldName, Iterable<Mailbox> mailboxes)
From
and
Resent-From
.fieldName
- the name of the mailbox field (From
or
Resent-From
).mailboxes
- mailbox addresses for the field value.public static AddressListField addressList(String fieldName, Iterable<? extends Address> addresses)
To
,
Cc
, Bcc
, Reply-To
,
Resent-To
, Resent-Cc
and
Resent-Bcc
.fieldName
- the name of the mailbox field (To
,
Cc
, Bcc
, Reply-To
,
Resent-To
, Resent-Cc
or
Resent-Bcc
).addresses
- mailbox or group addresses for the field value.Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.