public abstract class AttachmentFactory
extends java.lang.Object
Constructor and Description |
---|
AttachmentFactory() |
Modifier and Type | Method and Description |
---|---|
abstract Attachment |
createAttachment(java.lang.String id, javax.activation.DataHandler dataHandler)
Create an Attachment from a DataHandler.
|
abstract Attachment |
createAttachment(java.lang.String id, java.lang.String contentType, java.io.InputStream attachmentStream)
Create and Attachment from an InputStream.
|
abstract Attachments |
createAttachments()
Create an Attachments object.
|
static AttachmentFactory |
newInstance()
Get a new instance of the AttachmentFactory.
|
public static AttachmentFactory newInstance()
public abstract Attachments createAttachments()
public abstract Attachment createAttachment(java.lang.String id, javax.activation.DataHandler dataHandler)
id
- The Attachment ID. This corresponds to the Content-ID MIME headerdataHandler
- The DataHandler representing the attachment datapublic abstract Attachment createAttachment(java.lang.String id, java.lang.String contentType, java.io.InputStream attachmentStream)
id
- The Attachment ID. This corresponds to the Content-ID MIME headercontentType
- The Content-Type of the Attachment (e.g. text/plain, image/jpeg)attachmentStream
- An InputStream containing the binary data for the attachment