Class 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 Detail

      • 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