public class FileSystemAttachment extends Object implements Attachment, Serializable
| Constructor and Description |
|---|
FileSystemAttachment(String name,
String contentType,
File file,
String contentId) |
FileSystemAttachment(String name,
String contentType,
InputStream in,
String contentId) |
| Modifier and Type | Method and Description |
|---|---|
String |
getContentId() |
String |
getContentType() |
String |
getDisposition() |
InputStream |
getInputStream()
This method is necessary for DataSource support, but useData is preferred
|
String |
getName() |
static FileSystemAttachment |
parse(javax.mail.BodyPart bp) |
int |
size() |
void |
useData(InputStreamConsumer exec)
Use the data of the attachment.
|
public FileSystemAttachment(String name, String contentType, InputStream in, String contentId)
public static FileSystemAttachment parse(javax.mail.BodyPart bp)
public String getName()
getName in interface Attachmentpublic String getContentId()
getContentId in interface Attachmentpublic String getContentType()
getContentType in interface Attachmentpublic String getDisposition()
getDisposition in interface Attachmentpublic InputStream getInputStream()
AttachmentgetInputStream in interface Attachmentpublic void useData(InputStreamConsumer exec)
AttachmentuseData in interface Attachmentexec - - closure which will consume the stream of datapublic int size()
size in interface AttachmentCopyright © 2021 McEvoy Software Ltd. All rights reserved.