Package org.apache.poi.hsmf.extractor
Class OutlookTextExtractor
- java.lang.Object
-
- org.apache.poi.hsmf.extractor.OutlookTextExtractor
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,POIOLE2TextExtractor,POITextExtractor
public class OutlookTextExtractor extends java.lang.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(java.io.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()Return the underlying POIDocumentMAPIMessagegetFilesystem()MAPIMessagegetMAPIMessage()Returns the underlying MAPI messagejava.lang.StringgetText()Outputs something a little like a RFC822 emailbooleanisCloseFilesystem()static voidmain(java.lang.String[] args)voidsetCloseFilesystem(boolean doCloseFilesystem)-
Methods inherited from class java.lang.Object
equals, 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 java.io.IOException
- Throws:
java.io.IOException
-
OutlookTextExtractor
public OutlookTextExtractor(POIFSFileSystem fs) throws java.io.IOException
- Throws:
java.io.IOException
-
OutlookTextExtractor
public OutlookTextExtractor(java.io.InputStream inp) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception- Throws:
java.lang.Exception
-
getMAPIMessage
public MAPIMessage getMAPIMessage()
Returns the underlying MAPI message
-
getText
public java.lang.String getText()
Outputs something a little like a RFC822 email- Specified by:
getTextin interfacePOITextExtractor- Returns:
- All the text from the document
-
getDocument
public MAPIMessage getDocument()
Description copied from interface:POIOLE2TextExtractorReturn the underlying POIDocument- Specified by:
getDocumentin interfacePOIOLE2TextExtractor- Specified by:
getDocumentin interfacePOITextExtractor- Returns:
- the underlying POIDocument
-
setCloseFilesystem
public void setCloseFilesystem(boolean doCloseFilesystem)
- Specified by:
setCloseFilesystemin interfacePOITextExtractor- Parameters:
doCloseFilesystem-true(default), if underlying resources/filesystem should be closed onPOITextExtractor.close()
-
isCloseFilesystem
public boolean isCloseFilesystem()
- Specified by:
isCloseFilesystemin interfacePOITextExtractor- Returns:
true, if resources/filesystem should be closed onPOITextExtractor.close()
-
getFilesystem
public MAPIMessage getFilesystem()
- Specified by:
getFilesystemin interfacePOITextExtractor- Returns:
- The underlying resources/filesystem
-
-