All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.network.mail.base.Map

java.lang.Object
   |
   +----com.ibm.network.mail.base.Map

public class Map
extends Object
implements Serializable
This is a map between

Author:
Abdul Majeed Ghadialy, Mohit M. Sant
See Also:
MimeMessage

Constructor Index

 o Map(String, String)
Constructor for Map.

Method Index

 o getEncoding(String)
Returns the Content-Transfer-Encoding for the specified MIME data type.
 o getMimeType(String)
Returns the MIME data type for the specified file extension.

Constructors

 o Map
 public Map(String ext2mime,
            String mime2encodingType) throws IOException
Constructor for Map. Creates a Map and initializes it with contents of the resource files passed as arguments.

Parameters:
ext2mime - resource file in the format of a Properties file containing file extensions and corresponding MIME data types.
mime2encodingType - resource file in the format of a Properties file containing Content-Type and corresponding Content-Transfer-Encoding.
Throws: IOException
in case an IO error occurred during initialization.

Methods

 o getEncoding
 public int getEncoding(String mimeType)
Returns the Content-Transfer-Encoding for the specified MIME data type.

Parameters:
mimeType - MIME data type (Content-Type).
Returns:
Content-Transfer-Encoding.
 o getMimeType
 public String getMimeType(String fileExtn)
Returns the MIME data type for the specified file extension.

Parameters:
fileExtn - file extension.
Returns:
MIME data type (Content-Type).

All Packages  Class Hierarchy  This Package  Previous  Next  Index