Methods Summary |
---|
static void | addFileType(java.lang.String extension, int fileType, java.lang.String mimeType)
sFileTypeMap.put(extension, new MediaFileType(fileType, mimeType));
sMimeTypeMap.put(mimeType, new Integer(fileType));
|
public static android.media.MediaFile$MediaFileType | getFileType(java.lang.String path)
int lastDot = path.lastIndexOf(".");
if (lastDot < 0)
return null;
return sFileTypeMap.get(path.substring(lastDot + 1).toUpperCase());
|
public static int | getFileTypeForMimeType(java.lang.String mimeType)
Integer value = sMimeTypeMap.get(mimeType);
return (value == null ? 0 : value.intValue());
|
public static boolean | isAudioFileType(int fileType)
return ((fileType >= FIRST_AUDIO_FILE_TYPE &&
fileType <= LAST_AUDIO_FILE_TYPE) ||
(fileType >= FIRST_MIDI_FILE_TYPE &&
fileType <= LAST_MIDI_FILE_TYPE));
|
public static boolean | isImageFileType(int fileType)
return (fileType >= FIRST_IMAGE_FILE_TYPE &&
fileType <= LAST_IMAGE_FILE_TYPE);
|
public static boolean | isPlayListFileType(int fileType)
return (fileType >= FIRST_PLAYLIST_FILE_TYPE &&
fileType <= LAST_PLAYLIST_FILE_TYPE);
|
public static boolean | isVideoFileType(int fileType)
return (fileType >= FIRST_VIDEO_FILE_TYPE &&
fileType <= LAST_VIDEO_FILE_TYPE);
|