Android Utililty Methods File Type Check

List of utility methods to do File Type Check

Description

The list of methods to do File Type Check are organized into topic(s).

Method

booleanisAttacheFile(String fileName)
is Attache File
return checkExtFile(ATTACHE_FILE_EXT, fileName);
booleanisExeFile(String fileName)
is Exe File
return checkExtFile(EXE_FILE_EXT, fileName);
booleanisForbidFile(String fileName)
is Forbid File
return checkExtFile(FORBID_FILE_EXT, fileName);
booleanisImage(String fileName)
is Image
String extension = getFileExtension(fileName.toLowerCase());
return "jpg".equals(extension) || "jpeg".equals(extension)
        || "gif".equals(extension) || "png".equals(extension)
        || "bmp".equals(extension) || "icon".equals(extension);
booleanisImgageFile(String fileName)
is Imgage File
return checkExtFile(IMAGE_FILE_EXT, fileName);