common_helper/src/main/java/com/xiongyingqi/util/FileHelper.java
public static File[] listFilesBySuffix(File folder, final String suffix) {
        File[] files = folder.listFiles(new FilenameFilter() {
            @Override
            public boolean accept(File paramFile, String paramString) {
                String newSuffix = suffix;
                if (!newSuffix.startsWith(".")) {
                    newSuffix = "." + newSuffix;
                }
                if (paramString.endsWith(newSuffix)) {
                    return true;
                }
                return false;
            }
        });
        return files;
    }
public static File[] listFilesBySuffix(File folder, final String suffix) {
        File[] files = folder.listFiles(new FilenameFilter() {
            @Override
            public boolean accept(File paramFile, String paramString) {
                String newSuffix = suffix;
                if (!newSuffix.startsWith(".")) {
                    newSuffix = "." + newSuffix;
                }
                if (paramString.endsWith(newSuffix)) {
                    return true;
                }
                return false;
            }
        });
        return files;
    }
public static File [ ] listFilesBySuffix ( File folder , final String suffix ) { File [ ] files = folder . listFiles ( new FilenameFilter ( ) { @ Override public boolean accept ( File paramFile , String paramString ) { String newSuffix = suffix ; if ( ! newSuffix . startsWith ( "." ) ) { newSuffix = "." + newSuffix ; } if ( paramString . endsWith ( newSuffix ) ) { return true ; } return false ; } } ) ; return files ; }
根据后缀名从文件夹获取文件 <br>
2013-9-6 下午3:15:56

@param folder
@param suffix
@return
根据后缀名从文件夹获取文件 <br > 2013 - 9 - 6 下午3 : 15 : 56