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
- file extension and MIME Content-Type.
- MIME Content-Type and corresponding Content-Transfer-Encoding.
- Author:
- Abdul Majeed Ghadialy, Mohit M. Sant
- See Also:
- MimeMessage
-
Map(String, String)
- Constructor for
Map
.
-
getEncoding(String)
- Returns the Content-Transfer-Encoding for the specified MIME data type.
-
getMimeType(String)
- Returns the MIME data type for the specified file extension.
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.
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.
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