Here you can find the source of getExtension(final String fileName)
public static String getExtension(final String fileName)
//package com.java2s; import java.util.zip.ZipEntry; public class Main { public static String getExtension(final ZipEntry ze) { return getExtension(ze.getName()); }// www. ja va2 s . c om public static String getExtension(final String fileName) { return fileName.substring(fileName.lastIndexOf(".") + 1) .toLowerCase(); } }