net.freeutils.tnef

Class TNEF

public class TNEF extends Object

The TNEF class provides high-level utility methods to access TNEF streams and extract their contents. Note: This class is experimental and is intended to show possible uses of the Java TNEF package.

Since: 2003-04-25

Method Summary
static intextractContent(TNEFInputStream in, String outputdir)
Extracts the content from the given TNEFInputStream, saving attachments to the given output directory.
static intextractContent(Message message, String outputdir)
Extracts the content from the given TNEF Message, saving attachments to the given output directory.
static voidmain(String[] args)
Main entry point for command-line utility.

Method Detail

extractContent

public static int extractContent(TNEFInputStream in, String outputdir)
Extracts the content from the given TNEFInputStream, saving attachments to the given output directory.

Parameters: in the TNEFInputStream containing the content outputdir the directory in which attachments should be saved

Returns: the number of attachments that were saved

Throws: IOException if an I/O error occurs

extractContent

public static int extractContent(Message message, String outputdir)
Extracts the content from the given TNEF Message, saving attachments to the given output directory.

Parameters: message the Message containing the content outputdir the directory in which attachments should be saved

Returns: the number of attachments that were saved

Throws: IOException if an I/O error occurs

main

public static void main(String[] args)
Main entry point for command-line utility.

Parameters: args the command-line arguments