Package org.apache.poi.hmef.extractor
Class HMEFContentsExtractor
- java.lang.Object
-
- org.apache.poi.hmef.extractor.HMEFContentsExtractor
-
public final class HMEFContentsExtractor extends Object
A utility for extracting out the message body, and all attachments from a HMEF/TNEF/winmail.dat file
-
-
Constructor Summary
Constructors Constructor Description HMEFContentsExtractor(File filename)
HMEFContentsExtractor(HMEFMessage message)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
extractAttachments(File dir)
Extracts all the message attachments to the supplied directoryvoid
extractMessageBody(File dest)
Extracts the RTF message body to the supplied filevoid
extractMessageBody(OutputStream out)
Extracts the RTF message body to the supplied stream.static void
main(String[] args)
Usage: HMEFContentsExtractor <filename> <output dir>
-
-
-
Constructor Detail
-
HMEFContentsExtractor
public HMEFContentsExtractor(File filename) throws IOException
- Throws:
IOException
-
HMEFContentsExtractor
public HMEFContentsExtractor(HMEFMessage message)
-
-
Method Detail
-
main
public static void main(String[] args) throws IOException
Usage: HMEFContentsExtractor <filename> <output dir>- Throws:
IOException
-
extractMessageBody
public void extractMessageBody(File dest) throws IOException
Extracts the RTF message body to the supplied file- Throws:
IOException
-
extractMessageBody
public void extractMessageBody(OutputStream out) throws IOException
Extracts the RTF message body to the supplied stream. If there is no RTF message body, nothing will be written to the stream, but no errors or exceptions will be raised.- Throws:
IOException
-
extractAttachments
public void extractAttachments(File dir) throws IOException
Extracts all the message attachments to the supplied directory- Throws:
IOException
-
-