class FileHelper {

    public static String getRenamedFilename(File inputFile, String newName) {
        String fullPath = inputFile.getAbsolutePath();

        String oldName = inputFile.getName().replaceAll("\\..*", "");
        return fullPath.replaceAll(Pattern.quote(oldName) + "\\.", newName + ".");
    }

    private  FileHelper();

}