org.apache.poi.hsmf
Class MAPIMessage

java.lang.Object
  extended by org.apache.poi.hsmf.MAPIMessage

public class MAPIMessage
extends java.lang.Object

Reads an Outlook MSG File in and provides hooks into its data structure.

Author:
Travis Ferguson

Constructor Summary
MAPIMessage()
          Constructor for creating new files.
MAPIMessage(java.io.InputStream in)
          Constructor for reading MSG Files from an input stream.
MAPIMessage(java.lang.String filename)
          Constructor for reading MSG Files from the file system.
 
Method Summary
 java.lang.String getConversationTopic()
          Gets the conversation topic of the parsed Outlook Message.
 java.lang.String getDisplayBCC()
          Gets the display value of the "TO" line of the outlook message This is not the actual list of addresses/values that will be sent to if you click Reply in the email.
 java.lang.String getDisplayCC()
          Gets the display value of the "TO" line of the outlook message This is not the actual list of addresses/values that will be sent to if you click Reply in the email.
 java.lang.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.
 java.lang.String getDisplayTo()
          Gets the display value of the "TO" line of the outlook message This is not the actual list of addresses/values that will be sent to if you click Reply in the email.
 java.lang.String getMessageClass()
          Gets the message class of the parsed Outlook Message.
 java.lang.String getStringFromChunk(StringChunk chunk)
          Gets a string value based on the passed chunk.
 java.lang.String getSubject()
          Gets the subject line of the Outlook Message
 java.lang.String getTextBody()
          Gets the plain text body of this Outlook Message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MAPIMessage

public MAPIMessage()
Constructor for creating new files.


MAPIMessage

public MAPIMessage(java.lang.String filename)
            throws java.io.IOException
Constructor for reading MSG Files from the file system.

Parameters:
filename -
Throws:
java.io.IOException

MAPIMessage

public MAPIMessage(java.io.InputStream in)
            throws java.io.IOException
Constructor for reading MSG Files from an input stream.

Parameters:
in -
Throws:
java.io.IOException
Method Detail

getStringFromChunk

public java.lang.String getStringFromChunk(StringChunk chunk)
                                    throws ChunkNotFoundException
Gets a string value based on the passed chunk.

Parameters:
chunk -
Returns:
Throws:
ChunkNotFoundException

getTextBody

public java.lang.String getTextBody()
                             throws java.io.IOException,
                                    ChunkNotFoundException
Gets the plain text body of this Outlook Message

Returns:
The string representation of the 'text' version of the body, if available.
Throws:
java.io.IOException
ChunkNotFoundException

getSubject

public java.lang.String getSubject()
                            throws ChunkNotFoundException
Gets the subject line of the Outlook Message

Returns:
Throws:
ChunkNotFoundException

getDisplayTo

public java.lang.String getDisplayTo()
                              throws ChunkNotFoundException
Gets the display value of the "TO" line of the outlook message This is not the actual list of addresses/values that will be sent to if you click Reply in the email.

Returns:
Throws:
ChunkNotFoundException

getDisplayFrom

public java.lang.String getDisplayFrom()
                                throws ChunkNotFoundException
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.

Returns:
Throws:
ChunkNotFoundException

getDisplayCC

public java.lang.String getDisplayCC()
                              throws ChunkNotFoundException
Gets the display value of the "TO" line of the outlook message This is not the actual list of addresses/values that will be sent to if you click Reply in the email.

Returns:
Throws:
ChunkNotFoundException

getDisplayBCC

public java.lang.String getDisplayBCC()
                               throws ChunkNotFoundException
Gets the display value of the "TO" line of the outlook message This is not the actual list of addresses/values that will be sent to if you click Reply in the email.

Returns:
Throws:
ChunkNotFoundException

getConversationTopic

public java.lang.String getConversationTopic()
                                      throws ChunkNotFoundException
Gets the conversation topic of the parsed Outlook Message. This is the part of the subject line that is after the RE: and FWD:

Returns:
Throws:
ChunkNotFoundException

getMessageClass

public java.lang.String getMessageClass()
                                 throws ChunkNotFoundException
Gets the message class of the parsed Outlook Message. (Yes, you can use this to determine if a message is a calendar item, note, or actual outlook Message) For emails the class will be IPM.Note

Returns:
Throws:
ChunkNotFoundException


Copyright 2008 The Apache Software Foundation or its licensors, as applicable.