Package totalcross.net.mail
Class DataHandler
- java.lang.Object
-
- totalcross.net.mail.DataHandler
-
public class DataHandler extends java.lang.ObjectMaps a MIME type into an instance of a DataContentHandler.- Since:
- TotalCross 1.13
-
-
Constructor Summary
Constructors Constructor Description DataHandler()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddDataContentHandler(DataContentHandler dataContentHandler, java.lang.String mimeType)May be used to add an user-defined DataContentHandler, associated to a specific MIME type.static DataContentHandlergetDataContentHandler(java.lang.String mimeType)Retrieves the DataContentHandler associated with the given MIME type, returning a BinaryContentHandler if the given MIME type is not mapped to any handler.
-
-
-
Method Detail
-
addDataContentHandler
public static void addDataContentHandler(DataContentHandler dataContentHandler, java.lang.String mimeType)
May be used to add an user-defined DataContentHandler, associated to a specific MIME type.- Parameters:
dataContentHandler- the user-defined DataContentHandler to be addedmimeType- the MIME type this DataContentHandler should be associated to- Since:
- TotalCross 1.13
-
getDataContentHandler
public static DataContentHandler getDataContentHandler(java.lang.String mimeType)
Retrieves the DataContentHandler associated with the given MIME type, returning a BinaryContentHandler if the given MIME type is not mapped to any handler.- Parameters:
mimeType- MIME type of the content that we need to be handled- Returns:
- the requested DataContentHandler, or a BinaryContentHandler if the given MIME type is not mapped to any handler.
- Since:
- TotalCross 1.13
-
-