Package org.apache.poi.hsmf.extractor
Class OutlookTextExtractor
- java.lang.Object
-
- org.apache.poi.hsmf.extractor.OutlookTextExtractor
-
- All Implemented Interfaces:
Closeable,AutoCloseable,POIOLE2TextExtractor,POITextExtractor
public class OutlookTextExtractor extends Object implements POIOLE2TextExtractor
A text extractor for HSMF (Outlook) .msg files. Outputs in a format somewhat like a plain text email.- Since:
- 4.1.2
-
-
Constructor Summary
Constructors Constructor Description OutlookTextExtractor(InputStream inp)OutlookTextExtractor(MAPIMessage msg)OutlookTextExtractor(DirectoryNode poifsDir)OutlookTextExtractor(POIFSFileSystem fs)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MAPIMessagegetDocument()MAPIMessagegetFilesystem()MAPIMessagegetMAPIMessage()Returns the underlying MAPI messageStringgetText()Outputs something a little like a RFC822 emailprotected voidhandleEmails(StringBuilder s, String type, String displayText, Iterator<String> 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>"booleanisCloseFilesystem()static voidmain(String[] args)voidsetCloseFilesystem(boolean doCloseFilesystem)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.poi.extractor.POIOLE2TextExtractor
getDocSummaryInformation, getMetadataTextExtractor, getRoot, getSummaryInformation
-
Methods inherited from interface org.apache.poi.extractor.POITextExtractor
close
-
-
-
-
Constructor Detail
-
OutlookTextExtractor
public OutlookTextExtractor(MAPIMessage msg)
-
OutlookTextExtractor
public OutlookTextExtractor(DirectoryNode poifsDir) throws IOException
- Throws:
IOException
-
OutlookTextExtractor
public OutlookTextExtractor(POIFSFileSystem fs) throws IOException
- Throws:
IOException
-
OutlookTextExtractor
public OutlookTextExtractor(InputStream inp) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getMAPIMessage
public MAPIMessage getMAPIMessage()
Returns the underlying MAPI message
-
getText
public String getText()
Outputs something a little like a RFC822 email- Specified by:
getTextin interfacePOITextExtractor
-
handleEmails
protected void handleEmails(StringBuilder s, String type, String displayText, Iterator<String> 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>"
-
getDocument
public MAPIMessage getDocument()
- Specified by:
getDocumentin interfacePOIOLE2TextExtractor- Specified by:
getDocumentin interfacePOITextExtractor
-
setCloseFilesystem
public void setCloseFilesystem(boolean doCloseFilesystem)
- Specified by:
setCloseFilesystemin interfacePOITextExtractor
-
isCloseFilesystem
public boolean isCloseFilesystem()
- Specified by:
isCloseFilesystemin interfacePOITextExtractor
-
getFilesystem
public MAPIMessage getFilesystem()
- Specified by:
getFilesystemin interfacePOITextExtractor
-
-