jetbrick-commons/src/main/java/jetbrick/io/FilenameUtils.java
public static String getFileExtension(final String path) {
        if (path == null) {
            return null;
        }
        int extIndex = path.lastIndexOf('.');
        if (extIndex == -1) {
            return null;
        }
        int folderIndex = getFileSeparatorIndex(path);
        if (folderIndex > extIndex) {
            return null;
        }
        return path.substring(extIndex + 1);
    }
public static String getFileExtension(final String path) {
        if (path == null) {
            return null;
        }
        int extIndex = path.lastIndexOf('.');
        if (extIndex == -1) {
            return null;
        }
        int folderIndex = getFileSeparatorIndex(path);
        if (folderIndex > extIndex) {
            return null;
        }
        return path.substring(extIndex + 1);
    }
public static String getFileExtension ( final String path ) { if ( path == null ) { return null ; } int extIndex = path . lastIndexOf ( ' ' ) ; if ( extIndex == - 1 ) { return null ; } int folderIndex = getFileSeparatorIndex ( path ) ; if ( folderIndex > extIndex ) { return null ; } return path . substring ( extIndex + 1 ) ; }
得到文件扩展名.
得到文件扩展名 .