Package com.pff
Class PSTMessage
- java.lang.Object
-
- com.pff.PSTObject
-
- com.pff.PSTMessage
-
- Direct Known Subclasses:
PSTActivity,PSTAppointment,PSTContact,PSTDistList,PSTRss,PSTTask
public class PSTMessage extends PSTObject
PST Message contains functions that are common across most MAPI objects. Note that many of these functions may not be applicable for the item in question, however there seems to be no hard and fast outline for what properties apply to which objects. For properties where no value is set, a blank value is returned (rather than an exception being raised).
-
-
Field Summary
Fields Modifier and Type Field Description private PSTTable7CattachmentTableattachment stuff here, not sure if these can just exist in emails or not, but a table key of 0x0671 would suggest that this is a property of the envelope rather than a specific email propertystatic intIMPORTANCE_HIGHstatic intIMPORTANCE_LOWstatic intIMPORTANCE_NORMALstatic intRECIPIENT_TYPE_CCstatic intRECIPIENT_TYPE_TOprivate PSTTable7CrecipientTable-
Fields inherited from class com.pff.PSTObject
children, compEnc, data, descriptorIndexNode, items, localDescriptorItems, NID_TYPE_ASSOC_CONTENTS_TABLE, NID_TYPE_ASSOC_MESSAGE, NID_TYPE_ATTACHMENT, NID_TYPE_ATTACHMENT_TABLE, NID_TYPE_CONTENTS_TABLE, NID_TYPE_CONTENTS_TABLE_INDEX, NID_TYPE_HID, NID_TYPE_HIERARCHY_TABLE, NID_TYPE_INTERNAL, NID_TYPE_LTP, NID_TYPE_NORMAL_FOLDER, NID_TYPE_NORMAL_MESSAGE, NID_TYPE_OUTGOING_QUEUE_TABLE, NID_TYPE_RECEIVE_FOLDER_TABLE, NID_TYPE_RECIPIENT_TABLE, NID_TYPE_SEARCH_CONTENTS_TABLE, NID_TYPE_SEARCH_CRITERIA_OBJECT, NID_TYPE_SEARCH_FOLDER, NID_TYPE_SEARCH_TABLE_INDEX, NID_TYPE_SEARCH_UPDATE_QUEUE, pstFile, table
-
-
Constructor Summary
Constructors Constructor Description PSTMessage(PSTFile theFile, DescriptorIndexNode descriptorIndexNode)PSTMessage(PSTFile theFile, DescriptorIndexNode folderIndexNode, PSTTableBC table, java.util.HashMap<java.lang.Integer,PSTDescriptorItem> localDescriptorItems)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAcknowledgementMode()Acknowledgment mode Integer 32-bit signedjava.util.DategetActionDate()the date that this item had an action performed (eg.intgetActionFlag()Action flag This relates to the replying / forwarding of messages.PSTAttachmentgetAttachment(int attachmentNumber)get a specific attachment from this email.booleangetAttrHidden()Attribute hiddenbooleangetAttrReadonly()Attribute read onlybooleangetAttrSystem()Attribute systemjava.lang.StringgetBody()Plain text e-mail bodyjava.lang.StringgetBodyHTML()HTML e-mail bodyjava.lang.StringgetBodyPrefix()java.util.DategetClientSubmitTime()get the client submit timejava.lang.String[]getColorCategories()get the categories defined for this messagejava.lang.StringgetConversationTopic()Conversation topic This is basically the subject from which Fwd:, Re, etc.booleangetDeleteAfterSubmit()Delete after submitbooleangetDisableFullFidelity()Disable full fidelityjava.lang.StringgetDisplayBCC()Display BCCjava.lang.StringgetDisplayCC()Display CCjava.lang.StringgetDisplayTo()Display TointgetIconIndex()Icon indexintgetImportance()get the importance of the emailjava.lang.StringgetInReplyToId()In-Reply-TointgetInternetArticleNumber()Internet article numberjava.lang.StringgetInternetMessageId()Message ID for this email as allocated per rfc2822booleangetMessageCcMe()My address in CC field Booleanjava.lang.StringgetMessageClass()get the message class for the emailjava.util.DategetMessageDeliveryTime()Message delivery timejava.lang.StringgetMessageRecipMe()Message addressed to me ASCII or Unicode stringlonggetMessageSize()Message sizebooleangetMessageToMe()My address in To field Booleanjava.lang.StringgetNextSendAcct()intgetNumberOfAttachments()get the number of attachments for this messageintgetNumberOfRecipients()get the number of recipients for this messageintgetObjectType()Object typejava.lang.StringgetOriginalDisplayBcc()Original display BCC ASCII or Unicode stringjava.lang.StringgetOriginalDisplayCc()Original display CC ASCII or Unicode stringjava.lang.StringgetOriginalDisplayTo()Original display TO ASCII or Unicode stringintgetOriginalSensitivity()Original sensitivity Integer 32-bit signed the sensitivity of the message before being replied to or forwarded 0 = None 1 = Personal 2 = Private 3 = Company Confidentialjava.lang.StringgetOriginalSubject()Original subject ASCII or Unicode stringbooleangetOriginatorDeliveryReportRequested()Originator delivery report requested set if the sender wants a delivery report from all recipients 0 = false 0 != truebyte[]getPidTagSentRepresentingSearchKey()java.lang.StringgetPrimarySendAccount()intgetPriority()Priority Integer 32-bit signed -1 = NonUrgent 0 = Normal 1 = Urgentjava.lang.StringgetRcvdRepresentingAddrtype()Received representing address type.java.lang.StringgetRcvdRepresentingEmailAddress()Received representing e-mail addressjava.lang.StringgetRcvdRepresentingName()Received representing name ASCII or Unicode stringbooleangetReadReceiptRequested()Read Receipt Requested Boolean 0 = false 0 != truejava.lang.StringgetReceivedByAddress()Received by email addressjava.lang.StringgetReceivedByAddressType()Received by address type Known values are SMTP, EX (Exchange) and UNKNOWNjava.lang.StringgetReceivedByName()get received by namePSTRecipientgetRecipient(int recipientNumber)get a specific recipient from this email.booleangetRecipientReassignmentProhibited()Recipient Reassignment Prohibited Boolean 0 = false 0 != truejava.lang.StringgetRecipientsString()intgetRecipientType()Recipient type Integer 32-bit signed 0x01 => To 0x02 =>CCintgetReminderDelta()booleangetReminderSet()Is a reminder set on this object?java.lang.StringgetReplyRecipientNames()Reply recipients names ASCII or Unicode stringbooleangetResponseRequested()Response requested BooleanbooleangetResponsibility()Responsibilityjava.lang.StringgetReturnPath()Return Pathjava.lang.StringgetRTFBody()intgetRTFSyncBodyCount()RTF Sync Body character countintgetRTFSyncBodyCRC()RTF Sync Body CRCjava.lang.StringgetRTFSyncBodyTag()RTF Sync body tagintgetRTFSyncPrefixCount()RTF whitespace prefix countintgetRTFSyncTrailingCount()RTF whitespace tailing countjava.lang.StringgetSenderAddrtype()Sender address type.java.lang.StringgetSenderEmailAddress()Sender e-mail addressbyte[]getSenderEntryId()java.lang.StringgetSenderName()Sender nameintgetSensitivity()Sensitivity Integer 32-bit signed sender's opinion of the sensitivity of an email 0 = None 1 = Personal 2 = Private 3 = Company Confidentialjava.lang.StringgetSentRepresentingAddressType()Sent representing address type Known values are SMTP, EX (Exchange) and UNKNOWNjava.lang.StringgetSentRepresentingAddrtype()Sent representing address type ASCII or Unicode string Known values are SMTP, EX (Exchange) and UNKNOWNjava.lang.StringgetSentRepresentingEmailAddress()Sent representing email addressjava.lang.StringgetSentRepresentingName()get sent representing namejava.lang.StringgetSubject()get the subjectjava.util.DategetTaskDueDate()Due date Filetimejava.util.DategetTaskStartDate()Start date Filetimejava.lang.StringgetTransportMessageHeaders()Transport message headers ASCII or Unicode string These contain the SMTP e-mail headers.java.lang.StringgetURLCompName()URL computer name Contains the .eml file nameintgetURLCompNamePostfix()URL computer name postfixbooleanhasAttachments()booleanhasForwarded()is the action flag for this item "forward"?booleanhasReplied()is the action flag for this item "replied"?booleanisAssociated()booleanisFlagged()"flagged" items are actually emails with a due date.booleanisFromMe()booleanisNonReceiptNotificationRequested()Non receipt notification requestedbooleanisOriginatorNonDeliveryReportRequested()Originator non delivery report requestedbooleanisRead()booleanisReplyRequested()Reply requestedbooleanisResent()booleanisRTFInSync()Compressed RTF in Sync BooleanbooleanisSubmitted()booleanisUnmodified()booleanisUnsent()booleanisURLCompNameSet()URL computer name setprivate voidprocessAttachments()find, extract and load up all of the attachments in this email necessary for the other operations.private voidprocessRecipients()find, extract and load up all of the attachments in this email necessary for the other operations.java.lang.StringtoString()string representation of this email-
Methods inherited from class com.pff.PSTObject
apptTimeToCalendar, apptTimeToUTC, convertBigEndianBytesToLong, convertLittleEndianBytesToLong, convertLittleEndianBytesToLong, createAppropriatePSTMessageObject, createJavaString, decode, detectAndLoadPSTObject, detectAndLoadPSTObject, encode, filetimeToDate, getAddrType, getBinaryItem, getBooleanItem, getBooleanItem, getComment, getCreationTime, getDateItem, getDescriptorNode, getDescriptorNodeId, getDisplayName, getDoubleItem, getDoubleItem, getEmailAddress, getIntItem, getIntItem, getItemsString, getLastModificationTime, getLongItem, getLongItem, getNodeType, getNodeType, getStringItem, getStringItem, getStringItem, getTimeZoneItem, guessPSTObjectType, printFormattedNumber, printFormattedNumber, printHexFormatted, printHexFormatted
-
-
-
-
Field Detail
-
IMPORTANCE_LOW
public static final int IMPORTANCE_LOW
- See Also:
- Constant Field Values
-
IMPORTANCE_NORMAL
public static final int IMPORTANCE_NORMAL
- See Also:
- Constant Field Values
-
IMPORTANCE_HIGH
public static final int IMPORTANCE_HIGH
- See Also:
- Constant Field Values
-
RECIPIENT_TYPE_TO
public static final int RECIPIENT_TYPE_TO
- See Also:
- Constant Field Values
-
RECIPIENT_TYPE_CC
public static final int RECIPIENT_TYPE_CC
- See Also:
- Constant Field Values
-
recipientTable
private PSTTable7C recipientTable
-
attachmentTable
private PSTTable7C attachmentTable
attachment stuff here, not sure if these can just exist in emails or not, but a table key of 0x0671 would suggest that this is a property of the envelope rather than a specific email property
-
-
Constructor Detail
-
PSTMessage
PSTMessage(PSTFile theFile, DescriptorIndexNode descriptorIndexNode) throws PSTException, java.io.IOException
- Throws:
PSTExceptionjava.io.IOException
-
PSTMessage
PSTMessage(PSTFile theFile, DescriptorIndexNode folderIndexNode, PSTTableBC table, java.util.HashMap<java.lang.Integer,PSTDescriptorItem> localDescriptorItems)
-
-
Method Detail
-
getRTFBody
public java.lang.String getRTFBody() throws PSTException, java.io.IOException- Throws:
PSTExceptionjava.io.IOException
-
getImportance
public int getImportance()
get the importance of the email- Returns:
- IMPORTANCE_NORMAL if unknown
-
getMessageClass
public java.lang.String getMessageClass()
get the message class for the email- Overrides:
getMessageClassin classPSTObject- Returns:
- empty string if unknown
-
getSubject
public java.lang.String getSubject()
get the subject- Returns:
- empty string if not found
-
getClientSubmitTime
public java.util.Date getClientSubmitTime()
get the client submit time- Returns:
- null if not found
-
getReceivedByName
public java.lang.String getReceivedByName()
get received by name- Returns:
- empty string if not found
-
getSentRepresentingName
public java.lang.String getSentRepresentingName()
get sent representing name- Returns:
- empty string if not found
-
getSentRepresentingAddressType
public java.lang.String getSentRepresentingAddressType()
Sent representing address type Known values are SMTP, EX (Exchange) and UNKNOWN- Returns:
- empty string if not found
-
getSentRepresentingEmailAddress
public java.lang.String getSentRepresentingEmailAddress()
Sent representing email address- Returns:
- empty string if not found
-
getConversationTopic
public java.lang.String getConversationTopic()
Conversation topic This is basically the subject from which Fwd:, Re, etc. has been removed- Returns:
- empty string if not found
-
getReceivedByAddressType
public java.lang.String getReceivedByAddressType()
Received by address type Known values are SMTP, EX (Exchange) and UNKNOWN- Returns:
- empty string if not found
-
getReceivedByAddress
public java.lang.String getReceivedByAddress()
Received by email address- Returns:
- empty string if not found
-
getTransportMessageHeaders
public java.lang.String getTransportMessageHeaders()
Transport message headers ASCII or Unicode string These contain the SMTP e-mail headers.
-
isRead
public boolean isRead()
-
isUnmodified
public boolean isUnmodified()
-
isSubmitted
public boolean isSubmitted()
-
isUnsent
public boolean isUnsent()
-
hasAttachments
public boolean hasAttachments()
-
isFromMe
public boolean isFromMe()
-
isAssociated
public boolean isAssociated()
-
isResent
public boolean isResent()
-
getAcknowledgementMode
public int getAcknowledgementMode()
Acknowledgment mode Integer 32-bit signed
-
getOriginatorDeliveryReportRequested
public boolean getOriginatorDeliveryReportRequested()
Originator delivery report requested set if the sender wants a delivery report from all recipients 0 = false 0 != true
-
getPriority
public int getPriority()
Priority Integer 32-bit signed -1 = NonUrgent 0 = Normal 1 = Urgent
-
getReadReceiptRequested
public boolean getReadReceiptRequested()
Read Receipt Requested Boolean 0 = false 0 != true
-
getRecipientReassignmentProhibited
public boolean getRecipientReassignmentProhibited()
Recipient Reassignment Prohibited Boolean 0 = false 0 != true
-
getOriginalSensitivity
public int getOriginalSensitivity()
Original sensitivity Integer 32-bit signed the sensitivity of the message before being replied to or forwarded 0 = None 1 = Personal 2 = Private 3 = Company Confidential
-
getSensitivity
public int getSensitivity()
Sensitivity Integer 32-bit signed sender's opinion of the sensitivity of an email 0 = None 1 = Personal 2 = Private 3 = Company Confidential
-
getPidTagSentRepresentingSearchKey
public byte[] getPidTagSentRepresentingSearchKey()
-
getRcvdRepresentingName
public java.lang.String getRcvdRepresentingName()
Received representing name ASCII or Unicode string
-
getOriginalSubject
public java.lang.String getOriginalSubject()
Original subject ASCII or Unicode string
-
getReplyRecipientNames
public java.lang.String getReplyRecipientNames()
Reply recipients names ASCII or Unicode string
-
getMessageToMe
public boolean getMessageToMe()
My address in To field Boolean
-
getMessageCcMe
public boolean getMessageCcMe()
My address in CC field Boolean
-
getMessageRecipMe
public java.lang.String getMessageRecipMe()
Message addressed to me ASCII or Unicode string
-
getResponseRequested
public boolean getResponseRequested()
Response requested Boolean
-
getSentRepresentingAddrtype
public java.lang.String getSentRepresentingAddrtype()
Sent representing address type ASCII or Unicode string Known values are SMTP, EX (Exchange) and UNKNOWN
-
getOriginalDisplayBcc
public java.lang.String getOriginalDisplayBcc()
Original display BCC ASCII or Unicode string
-
getOriginalDisplayCc
public java.lang.String getOriginalDisplayCc()
Original display CC ASCII or Unicode string
-
getOriginalDisplayTo
public java.lang.String getOriginalDisplayTo()
Original display TO ASCII or Unicode string
-
getRcvdRepresentingAddrtype
public java.lang.String getRcvdRepresentingAddrtype()
Received representing address type. Known values are SMTP, EX (Exchange) and UNKNOWN
-
getRcvdRepresentingEmailAddress
public java.lang.String getRcvdRepresentingEmailAddress()
Received representing e-mail address
-
isNonReceiptNotificationRequested
public boolean isNonReceiptNotificationRequested()
Non receipt notification requested
-
isOriginatorNonDeliveryReportRequested
public boolean isOriginatorNonDeliveryReportRequested()
Originator non delivery report requested
-
getRecipientType
public int getRecipientType()
Recipient type Integer 32-bit signed 0x01 => To 0x02 =>CC
-
isReplyRequested
public boolean isReplyRequested()
Reply requested
-
getSenderEntryId
public byte[] getSenderEntryId()
-
getSenderName
public java.lang.String getSenderName()
Sender name
-
getSenderAddrtype
public java.lang.String getSenderAddrtype()
Sender address type. Known values are SMTP, EX (Exchange) and UNKNOWN
-
getSenderEmailAddress
public java.lang.String getSenderEmailAddress()
Sender e-mail address
-
getMessageSize
public long getMessageSize()
Message size
-
getInternetArticleNumber
public int getInternetArticleNumber()
Internet article number
-
getPrimarySendAccount
public java.lang.String getPrimarySendAccount()
-
getNextSendAcct
public java.lang.String getNextSendAcct()
-
getURLCompNamePostfix
public int getURLCompNamePostfix()
URL computer name postfix
-
getObjectType
public int getObjectType()
Object type
-
getDeleteAfterSubmit
public boolean getDeleteAfterSubmit()
Delete after submit
-
getResponsibility
public boolean getResponsibility()
Responsibility
-
isRTFInSync
public boolean isRTFInSync()
Compressed RTF in Sync Boolean
-
isURLCompNameSet
public boolean isURLCompNameSet()
URL computer name set
-
getDisplayBCC
public java.lang.String getDisplayBCC()
Display BCC
-
getDisplayCC
public java.lang.String getDisplayCC()
Display CC
-
getDisplayTo
public java.lang.String getDisplayTo()
Display To
-
getMessageDeliveryTime
public java.util.Date getMessageDeliveryTime()
Message delivery time
-
getBody
public java.lang.String getBody()
Plain text e-mail body
-
getBodyPrefix
public java.lang.String getBodyPrefix()
-
getRTFSyncBodyCRC
public int getRTFSyncBodyCRC()
RTF Sync Body CRC
-
getRTFSyncBodyCount
public int getRTFSyncBodyCount()
RTF Sync Body character count
-
getRTFSyncBodyTag
public java.lang.String getRTFSyncBodyTag()
RTF Sync body tag
-
getRTFSyncPrefixCount
public int getRTFSyncPrefixCount()
RTF whitespace prefix count
-
getRTFSyncTrailingCount
public int getRTFSyncTrailingCount()
RTF whitespace tailing count
-
getBodyHTML
public java.lang.String getBodyHTML()
HTML e-mail body
-
getInternetMessageId
public java.lang.String getInternetMessageId()
Message ID for this email as allocated per rfc2822
-
getInReplyToId
public java.lang.String getInReplyToId()
In-Reply-To
-
getReturnPath
public java.lang.String getReturnPath()
Return Path
-
getIconIndex
public int getIconIndex()
Icon index
-
getActionFlag
public int getActionFlag()
Action flag This relates to the replying / forwarding of messages. It is classified as "unknown" atm, so just provided here in case someone works out what all the various flags mean.
-
hasForwarded
public boolean hasForwarded()
is the action flag for this item "forward"?
-
hasReplied
public boolean hasReplied()
is the action flag for this item "replied"?
-
getActionDate
public java.util.Date getActionDate()
the date that this item had an action performed (eg. replied or forwarded)
-
getDisableFullFidelity
public boolean getDisableFullFidelity()
Disable full fidelity
-
getURLCompName
public java.lang.String getURLCompName()
URL computer name Contains the .eml file name
-
getAttrHidden
public boolean getAttrHidden()
Attribute hidden
-
getAttrSystem
public boolean getAttrSystem()
Attribute system
-
getAttrReadonly
public boolean getAttrReadonly()
Attribute read only
-
processRecipients
private void processRecipients()
find, extract and load up all of the attachments in this email necessary for the other operations.- Throws:
PSTExceptionjava.io.IOException
-
getNumberOfRecipients
public int getNumberOfRecipients() throws PSTException, java.io.IOExceptionget the number of recipients for this message- Throws:
PSTExceptionjava.io.IOException
-
processAttachments
private void processAttachments() throws PSTException, java.io.IOExceptionfind, extract and load up all of the attachments in this email necessary for the other operations.- Throws:
PSTExceptionjava.io.IOException
-
getTaskStartDate
public java.util.Date getTaskStartDate()
Start date Filetime
-
getTaskDueDate
public java.util.Date getTaskDueDate()
Due date Filetime
-
getReminderSet
public boolean getReminderSet()
Is a reminder set on this object?- Returns:
-
getReminderDelta
public int getReminderDelta()
-
isFlagged
public boolean isFlagged()
"flagged" items are actually emails with a due date. This convience method just checks to see if that is true.
-
getColorCategories
public java.lang.String[] getColorCategories() throws PSTExceptionget the categories defined for this message- Throws:
PSTException
-
getNumberOfAttachments
public int getNumberOfAttachments()
get the number of attachments for this message- Throws:
PSTExceptionjava.io.IOException
-
getAttachment
public PSTAttachment getAttachment(int attachmentNumber) throws PSTException, java.io.IOException
get a specific attachment from this email.- Parameters:
attachmentNumber-- Returns:
- the attachment at the defined index
- Throws:
PSTExceptionjava.io.IOException
-
getRecipient
public PSTRecipient getRecipient(int recipientNumber) throws PSTException, java.io.IOException
get a specific recipient from this email.- Parameters:
recipientNumber-- Returns:
- the recipient at the defined index
- Throws:
PSTExceptionjava.io.IOException
-
getRecipientsString
public java.lang.String getRecipientsString()
-
-