Here you can find the source of getFileExt(String fileFullName)
public static String getFileExt(String fileFullName)
//package com.java2s; public class Main { public static String getFileExt(String fileFullName) { int dot = fileFullName.lastIndexOf("."); if ((dot > -1) && (dot < fileFullName.length() - 1)) { return fileFullName.substring(dot + 1); } else {//from w w w . j av a 2 s . c om return null; } } }