Here you can find the source of getExtensionName(String fileName)
public static String getExtensionName(String fileName)
//package com.java2s; //License from project: Apache License public class Main { public static String getExtensionName(String fileName) { if ((fileName != null) && (fileName.length() > 0)) { int dot = fileName.lastIndexOf('.'); if ((dot > -1) && (dot < (fileName.length() - 1))) { return fileName.substring(dot + 1).toLowerCase(); }// ww w . j av a2 s .co m } return ""; } }