Here you can find the source of getSuffix(String fileName)
public static String getSuffix(String fileName)
//package com.java2s; import android.text.TextUtils; public class Main { public static String getSuffix(String fileName) { if (!TextUtils.isEmpty(fileName) && fileName.contains(".")) { return fileName.substring(fileName.lastIndexOf(".") + 1); }/*from w ww . j a v a 2 s . com*/ return ""; } }