Android Utililty Methods File Extension Name Get

List of utility methods to do File Extension Name Get

Description

The list of methods to do File Extension Name Get are organized into topic(s).

Method

StringgetFileExtension(String fullFilename, Boolean withDot)
get File Extension
String ext = fullFilename.substring(fullFilename.lastIndexOf(".")
        + (withDot ? 0 : 1), fullFilename.length());
return ext.toUpperCase();
StringgetFileExtensionOnly(String filename)
get File Extension Only
String extension = filename.substring(
        (filename.lastIndexOf(".") + 1), filename.length());
return extension;