Package org.apache.poi.hsmf.extractor
Class OutlookTextExtactor
java.lang.Object
org.apache.poi.extractor.POITextExtractor
org.apache.poi.extractor.POIOLE2TextExtractor
org.apache.poi.hsmf.extractor.OutlookTextExtactor
- All Implemented Interfaces:
Closeable
,AutoCloseable
A text extractor for HSMF (Outlook) .msg files.
Outputs in a format somewhat like a plain text email.
-
Field Summary
Fields inherited from class org.apache.poi.extractor.POIOLE2TextExtractor
document
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the underlying MAPI messagegetText()
Outputs something a little like a RFC822 emailprotected void
handleEmails
(StringBuffer s, String type, String displayText, StringUtil.StringsIterator emails) Takes a Display focused string, eg "Nick; Jim" and an iterator of emails, and does its best to return something like "Nick <nick@example.com>; Jim <jim@example.com>"static void
Methods inherited from class org.apache.poi.extractor.POIOLE2TextExtractor
getDocSummaryInformation, getDocument, getMetadataTextExtractor, getRoot, getSummaryInformation
Methods inherited from class org.apache.poi.extractor.POITextExtractor
close, setFilesystem
-
Constructor Details
-
OutlookTextExtactor
-
OutlookTextExtactor
- Throws:
IOException
-
OutlookTextExtactor
- Throws:
IOException
-
OutlookTextExtactor
- Throws:
IOException
-
-
Method Details
-
main
- Throws:
Exception
-
getMAPIMessage
Returns the underlying MAPI message -
getText
Outputs something a little like a RFC822 email- Specified by:
getText
in classPOITextExtractor
- Returns:
- All the text from the document
-
handleEmails
protected void handleEmails(StringBuffer s, String type, String displayText, StringUtil.StringsIterator emails) Takes a Display focused string, eg "Nick; Jim" and an iterator of emails, and does its best to return something like "Nick <nick@example.com>; Jim <jim@example.com>"
-