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 MAPIMessage
getDocument()
Return the underlying POIDocumentMAPIMessage
getFilesystem()
MAPIMessage
getMAPIMessage()
Returns the underlying MAPI messagejava.lang.String
getText()
Outputs something a little like a RFC822 emailboolean
isCloseFilesystem()
static void
main(java.lang.String[] args)
void
setCloseFilesystem(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:
getText
in interfacePOITextExtractor
- Returns:
- All the text from the document
-
getDocument
public MAPIMessage getDocument()
Description copied from interface:POIOLE2TextExtractor
Return the underlying POIDocument- Specified by:
getDocument
in interfacePOIOLE2TextExtractor
- Specified by:
getDocument
in interfacePOITextExtractor
- Returns:
- the underlying POIDocument
-
setCloseFilesystem
public void setCloseFilesystem(boolean doCloseFilesystem)
- Specified by:
setCloseFilesystem
in interfacePOITextExtractor
- Parameters:
doCloseFilesystem
-true
(default), if underlying resources/filesystem should be closed onPOITextExtractor.close()
-
isCloseFilesystem
public boolean isCloseFilesystem()
- Specified by:
isCloseFilesystem
in interfacePOITextExtractor
- Returns:
true
, if resources/filesystem should be closed onPOITextExtractor.close()
-
getFilesystem
public MAPIMessage getFilesystem()
- Specified by:
getFilesystem
in interfacePOITextExtractor
- Returns:
- The underlying resources/filesystem
-
-