Here you can find the source of chopExt(String orig)
private static String chopExt(String orig)
//package com.java2s; //License from project: Apache License public class Main { private static String chopExt(String orig) { int lastDot = orig.lastIndexOf('.'); return lastDot < 0 ? orig : orig.substring(0, lastDot); }/*from w w w . j ava 2 s. com*/ }