Build 1.0_r1(from source)

android.webkit
Class MimeTypeMap

java.lang.Object
  extended by android.webkit.MimeTypeMap

public class MimeTypeMap
extends Object

Two-way map that maps MIME-types to file extensions and vice versa.


Method Summary
 String getExtensionFromMimeType(String mimeType)
           
static String getFileExtensionFromUrl(String url)
          Returns the file extension or an empty string iff there is no extension.
 String getMimeTypeFromExtension(String extension)
           
static MimeTypeMap getSingleton()
           
 boolean hasExtension(String extension)
           
 boolean hasMimeType(String mimeType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFileExtensionFromUrl

public static String getFileExtensionFromUrl(String url)
Returns the file extension or an empty string iff there is no extension.


hasMimeType

public boolean hasMimeType(String mimeType)
Returns:
True iff there is a mimeType entry in the map.

getMimeTypeFromExtension

public String getMimeTypeFromExtension(String extension)
Returns:
The extension for the MIME type or null iff there is none.

hasExtension

public boolean hasExtension(String extension)
Returns:
True iff there is an extension entry in the map.

getExtensionFromMimeType

public String getExtensionFromMimeType(String mimeType)
Returns:
The MIME type for the extension or null iff there is none.

getSingleton

public static MimeTypeMap getSingleton()
Returns:
The singleton instance of the MIME-type map.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature