public class MAPIMessage extends POIDocument
directory
Constructor and Description |
---|
MAPIMessage()
Constructor for creating new files.
|
MAPIMessage(DirectoryNode poifsDir)
Constructor for reading MSG Files from a certain
point within a POIFS filesystem
|
MAPIMessage(DirectoryNode poifsDir,
POIFSFileSystem fs)
Deprecated.
Use
MAPIMessage(DirectoryNode) instead |
MAPIMessage(InputStream in)
Constructor for reading MSG Files from an input stream.
|
MAPIMessage(NPOIFSFileSystem fs)
Constructor for reading MSG Files from a POIFS filesystem
|
MAPIMessage(POIFSFileSystem fs)
Constructor for reading MSG Files from a POIFS filesystem
|
MAPIMessage(String filename)
Constructor for reading MSG Files from the file system.
|
Modifier and Type | Method and Description |
---|---|
AttachmentChunks[] |
getAttachmentFiles()
Gets the message attachments.
|
String |
getConversationTopic()
Gets the conversation topic of the parsed Outlook Message.
|
String |
getDisplayBCC()
Gets the display value of the "BCC" line of the outlook message.
|
String |
getDisplayCC()
Gets the display value of the "CC" line of the outlook message.
|
String |
getDisplayFrom()
Gets the display value of the "FROM" line of the outlook message
This is not the actual address that was sent from but the formated display of the user name.
|
String |
getDisplayTo()
Gets the display value of the "TO" line of the outlook message.
|
String[] |
getHeaders()
Returns all the headers, one entry per line
|
String |
getHmtlBody()
Deprecated.
|
String |
getHtmlBody()
Gets the html body of this Outlook Message, if this email
contains a html version.
|
Chunks |
getMainChunks()
Gets the main, core details chunks
|
String |
getMessageClass()
Gets the message class of the parsed Outlook Message.
|
Calendar |
getMessageDate()
Gets the date that the message was accepted by the
server on.
|
NameIdChunks |
getNameIdChunks()
Gets the Name ID chunks, or
null if there aren't any
|
RecipientChunks[] |
getRecipientDetailsChunks()
Gets all the recipient details chunks.
|
String |
getRecipientEmailAddress()
Returns all the recipients' email address, separated by
semicolons.
|
String[] |
getRecipientEmailAddressList()
Returns an array of all the recipient's email address, normally
in TO then CC then BCC order.
|
String |
getRecipientNames()
Returns all the recipients' names, separated by
semicolons.
|
String[] |
getRecipientNamesList()
Returns an array of all the recipient's names, normally
in TO then CC then BCC order.
|
String |
getRtfBody()
Gets the RTF Rich Message body of this Outlook Message, if this email
contains a RTF (rich) version.
|
String |
getStringFromChunk(StringChunk chunk)
Gets a string value based on the passed chunk.
|
String |
getSubject()
Gets the subject line of the Outlook Message
|
String |
getTextBody()
Gets the plain text body of this Outlook Message
|
void |
guess7BitEncoding()
Many messages store their strings as unicode, which is
nice and easy.
|
boolean |
has7BitEncodingStrings()
Does this file contain any strings that
are stored as 7 bit rather than unicode?
|
boolean |
isReturnNullOnMissingChunk()
Will you get a null on a missing chunk, or a
ChunkNotFoundException (default is the
exception). |
void |
set7BitEncoding(String charset)
Many messages store their strings as unicode, which is
nice and easy.
|
void |
setReturnNullOnMissingChunk(boolean returnNullOnMissingChunk)
Sets whether on asking for a missing chunk,
you get back null or a
ChunkNotFoundException
(default is the exception). |
void |
write(OutputStream out)
Note - not yet supported, sorry.
|
copyNodeRecursively, copyNodes, copyNodes, createInformationProperties, getDocumentSummaryInformation, getPropertySet, getSummaryInformation, readProperties, writeProperties, writeProperties, writePropertySet
public MAPIMessage()
public MAPIMessage(String filename) throws IOException
filename
- IOException
public MAPIMessage(InputStream in) throws IOException
in
- IOException
public MAPIMessage(POIFSFileSystem fs) throws IOException
fs
- IOException
public MAPIMessage(NPOIFSFileSystem fs) throws IOException
fs
- IOException
@Deprecated public MAPIMessage(DirectoryNode poifsDir, POIFSFileSystem fs) throws IOException
MAPIMessage(DirectoryNode)
insteadIOException
public MAPIMessage(DirectoryNode poifsDir) throws IOException
poifsDir
- IOException
public String getStringFromChunk(StringChunk chunk) throws ChunkNotFoundException
ChunkNotFoundException
- if the chunk isn't therepublic String getTextBody() throws ChunkNotFoundException
ChunkNotFoundException
public String getHtmlBody() throws ChunkNotFoundException
ChunkNotFoundException
@Deprecated public String getHmtlBody() throws ChunkNotFoundException
ChunkNotFoundException
public String getRtfBody() throws ChunkNotFoundException
ChunkNotFoundException
public String getSubject() throws ChunkNotFoundException
ChunkNotFoundException
public String getDisplayFrom() throws ChunkNotFoundException
ChunkNotFoundException
public String getDisplayTo() throws ChunkNotFoundException
RecipientChunks
.ChunkNotFoundException
public String getDisplayCC() throws ChunkNotFoundException
RecipientChunks
.ChunkNotFoundException
public String getDisplayBCC() throws ChunkNotFoundException
RecipientChunks
.
This will only be present in sent emails, not received ones!ChunkNotFoundException
public String getRecipientEmailAddress() throws ChunkNotFoundException
ChunkNotFoundException
public String[] getRecipientEmailAddressList() throws ChunkNotFoundException
ChunkNotFoundException
public String getRecipientNames() throws ChunkNotFoundException
getDisplayTo()
, getDisplayCC()
and getDisplayBCC()
.ChunkNotFoundException
public String[] getRecipientNamesList() throws ChunkNotFoundException
getDisplayTo()
, getDisplayCC()
and getDisplayBCC()
.ChunkNotFoundException
public void guess7BitEncoding()
public void set7BitEncoding(String charset)
guess7BitEncoding()
public boolean has7BitEncodingStrings()
public String[] getHeaders() throws ChunkNotFoundException
ChunkNotFoundException
public String getConversationTopic() throws ChunkNotFoundException
ChunkNotFoundException
public String getMessageClass() throws ChunkNotFoundException
ChunkNotFoundException
public Calendar getMessageDate() throws ChunkNotFoundException
ChunkNotFoundException
public Chunks getMainChunks()
public RecipientChunks[] getRecipientDetailsChunks()
getDisplayTo()
* CC recipients, in the order returned by getDisplayCC()
* BCC recipients, in the order returned by getDisplayBCC()
public NameIdChunks getNameIdChunks()
public AttachmentChunks[] getAttachmentFiles()
public void write(OutputStream out) throws IOException
write
in class POIDocument
IOException
public boolean isReturnNullOnMissingChunk()
ChunkNotFoundException
(default is the
exception).public void setReturnNullOnMissingChunk(boolean returnNullOnMissingChunk)
ChunkNotFoundException
(default is the exception).Copyright © 2020. All rights reserved.