Package org.apache.poi.examples.hsmf
Class Msg2txt
- java.lang.Object
-
- org.apache.poi.examples.hsmf.Msg2txt
-
public class Msg2txt extends Object
Reads one or several Outlook MSG files and for each of them creates a text file from available chunks and a directory that contains attachments.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidmain(String[] args)Processes the list of arguments as a list of names of Outlook MSG files.voidprocessAttachment(AttachmentChunks attachment, File dir)Processes a single attachment: reads it from the Outlook MSG file and writes it to disk as an individual file.voidprocessMessage()Processes the message.
-
-
-
Constructor Detail
-
Msg2txt
public Msg2txt(String fileName) throws IOException
- Throws:
IOException
-
-
Method Detail
-
processMessage
public void processMessage() throws IOExceptionProcesses the message.- Throws:
IOException- if an exception occurs while writing the message out
-
processAttachment
public void processAttachment(AttachmentChunks attachment, File dir) throws IOException
Processes a single attachment: reads it from the Outlook MSG file and writes it to disk as an individual file.- Parameters:
attachment- the chunk group describing the attachmentdir- the directory in which to write the attachment file- Throws:
IOException- when any of the file operations fails
-
main
public static void main(String[] args)
Processes the list of arguments as a list of names of Outlook MSG files.- Parameters:
args- the list of MSG files to process
-
-