android.webkit
Class MimeTypeMap
java.lang.Object
android.webkit.MimeTypeMap
public class MimeTypeMap
- extends Object
Two-way map that maps MIME-types to file extensions and vice versa.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
Please submit a feedback, bug or feature