Here you can find the source of getSuffix(String f)
public static String getSuffix(String f)
//package com.java2s; public class Main { public static String getSuffix(String f) { int idx = f.lastIndexOf('.'); if (idx > -1) { return f.substring(f.lastIndexOf('.') + 1); }/*from w ww. j a v a2 s . c om*/ return null; } }