totalcross.net.mail
Class DataHandler

totalcross.lang.Object
  extended by totalcross.net.mail.DataHandler

public class DataHandler
extends totalcross.lang.Object

Maps a MIME type into an instance of a DataContentHandler.

Since:
TotalCross 1.13

Constructor Summary
DataHandler()
           
 
Method Summary
static void addDataContentHandler(DataContentHandler dataContentHandler, String mimeType)
          May be used to add an user-defined DataContentHandler, associated to a specific MIME type.
static DataContentHandler getDataContentHandler(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.
 
Methods inherited from class totalcross.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataHandler

public DataHandler()
Method Detail

addDataContentHandler

public static void addDataContentHandler(DataContentHandler dataContentHandler,
                                         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 added
mimeType - the MIME type this DataContentHandler should be associated to
Since:
TotalCross 1.13

getDataContentHandler

public static DataContentHandler getDataContentHandler(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