class Utils {

    public static String getBaseFileName(final String fileName,
                                         final String suffix) {
        final int suffixIndex = fileName.lastIndexOf("." + suffix);
        return (suffixIndex > 0 ? fileName.substring(0,
                                                     suffixIndex) : fileName);
    }

}