Android
android.webkit
public class

android.webkit.MimeTypeMap

java.lang.Object
android.webkit.MimeTypeMap

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

Summary

Public Methods

          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

Details

Public Methods

public String getExtensionFromMimeType(String mimeType)

Returns

  • The MIME type for the extension or null iff there is none.

public static String getFileExtensionFromUrl(String url)

Returns the file extension or an empty string iff there is no extension.

public String getMimeTypeFromExtension(String extension)

Returns

  • The extension for the MIME type or null iff there is none.

public static MimeTypeMap getSingleton()

Returns

  • The singleton instance of the MIME-type map.

public boolean hasExtension(String extension)

Returns

  • True iff there is an extension entry in the map.

public boolean hasMimeType(String mimeType)

Returns

  • True iff there is a mimeType entry in the map.
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48