Here you can find the source of getFileNameWithoutExtension(File file)
public static String getFileNameWithoutExtension(File file)
//package com.java2s; //License from project: Apache License import java.io.File; public class Main { public static String getFileNameWithoutExtension(File file) { String fileName = file.getName(); int pos = fileName.lastIndexOf("."); if (pos > 0) { fileName = fileName.substring(0, pos); }/* www . ja v a 2s . c o m*/ return fileName; } }