public class AttachmentDetails extends Object
Constructor and Description |
---|
AttachmentDetails(MessageFile messageFile,
String contentType)
Create a new AttachmentDetails object for the given filename, content type and transfer encoding
|
AttachmentDetails(String textContent)
Create a new AttachmentDetails object for a String
|
AttachmentDetails(String fileName,
String contentType)
Create a new AttachmentDetails object for the given filename, content type and transfer encoding
|
Modifier and Type | Method and Description |
---|---|
String |
getContentTransferEncoding()
The content transfer encoding of the attachment
|
String |
getContentType()
The content type of the attachment
|
String |
getFileName()
The name of the file holding the attachment or null
|
MessageFile |
getMessageFile()
Return the MessageFile containing the payload, or null if none have been used
|
String |
getOriginalFileName()
The original name of the file (not the path) which contained the attachment
|
String |
getPayloadHeader(String key) |
String |
getTextContent()
The text content of the attachment, if the attachment is a String and not a file
|
boolean |
isText()
Is the attachment a String and not a file?
|
void |
setOriginalFileName(String originalFileName)
Set the original name of the file containing the attachment
|
String |
toString() |
public AttachmentDetails(MessageFile messageFile, String contentType)
messageFile
- a MessageFile from a file cache containing the payloadcontentType
- content type of the attachment filepublic AttachmentDetails(String fileName, String contentType)
fileName
- the complete file name for the attachmentcontentType
- content type of the attachment filepublic AttachmentDetails(String textContent)
textContent
- the String holding the input for the attachmentpublic MessageFile getMessageFile()
public String getFileName()
public String getContentType()
public String getContentTransferEncoding()
public String getTextContent()
public boolean isText()
public String getOriginalFileName()
public void setOriginalFileName(String originalFileName)
originalFileName
- the original name of the file containing the attachmentCopyright © 2010–2016 AdroitLogic. All rights reserved.