Android examples for java.io:File Path
get Extension name from a path
import android.location.Location; import java.math.BigDecimal; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.text.DecimalFormat; import java.text.NumberFormat; public class Main{ public static String getExtension(String s) { int dot = s.lastIndexOf("."); return s.substring(dot + 1); }/*from ww w.j a va 2 s . co m*/ }