Here you can find the source of getPathCleanName(Path object)
public static String getPathCleanName(Path object)
//package com.java2s; //License from project: Apache License import java.nio.file.*; public class Main { public static String getPathCleanName(Path object) { return object.getFileName().toString().replaceAll("\\..*", ""); }/*from ww w . j a v a2s . c o m*/ }