Here you can find the source of extractExtensions(String fileName)
public static String extractExtensions(String fileName)
//package com.java2s; //License from project: LGPL public class Main { public static String extractExtensions(String fileName) { int pos = fileName.lastIndexOf("."); if (pos == -1) return ""; return fileName.substring(fileName.lastIndexOf(".")); }//from w ww. j a v a 2 s . c o m }