public abstract class AttachmentFactory
extends java.lang.Object
Attachment attachment =
AttachmentFactory.getInstance().createAttachment("xyz",
"plain/text; charset=us-ascii",
"Attachment Content".getBytes("us-ascii"));
message.addAttachment(attachment);
Constructor and Description |
---|
AttachmentFactory() |
Modifier and Type | Method and Description |
---|---|
abstract Attachment |
createAttachment(java.lang.String contentId, java.lang.String contentType, byte[] content)
Creates a message attachment
|
abstract Attachment |
createAttachment(java.lang.String contentId, java.lang.String contentType, java.io.InputStream content)
Creates a message attachment
|
abstract Attachment |
createAttachment(java.lang.String contentId, java.lang.String contentType, java.io.InputStream content, java.lang.String transferEncoding)
Creates a message attachment
|
abstract Attachment |
createAttachment(java.lang.String contentId, java.lang.String contentType, java.lang.String partName, byte[] content, java.lang.String transferEncoding)
Creates a message attachment
|
static AttachmentFactory |
getInstance() |
public abstract Attachment createAttachment(java.lang.String contentId, java.lang.String contentType, byte[] content)
contentId
- the Content-ID value of the attachment; may be nullcontentType
- the Content-Type value of the attachment; may be nullcontent
- the attachment contentpublic abstract Attachment createAttachment(java.lang.String contentId, java.lang.String contentType, java.io.InputStream content)
contentId
- the Content-ID value of the attachment; may be nullcontentType
- the Content-Type value of the attachment; may be nullcontent
- the attachment contentpublic abstract Attachment createAttachment(java.lang.String contentId, java.lang.String contentType, java.io.InputStream content, java.lang.String transferEncoding)
contentId
- the Content-ID value of the attachment; may be nullcontentType
- the Content-Type value of the attachment; may be nullcontent
- the attachment contenttransferEncoding
- the transfer encoding to be used for the attachmentpublic abstract Attachment createAttachment(java.lang.String contentId, java.lang.String contentType, java.lang.String partName, byte[] content, java.lang.String transferEncoding)
contentId
- the Content-ID value of the attachment; may be nullcontentType
- the Content-Type value of the attachment; may be nullpartName
- the partName this payload maps to.content
- the attachment contenttransferEncoding
- the transfer encoding to be used for the attachmentpublic static AttachmentFactory getInstance()