Here you can find the source of getFiles(String path, String endian)
public static ArrayList<File> getFiles(String path, String endian)
//package com.java2s; //License from project: Apache License import java.io.File; import java.util.ArrayList; public class Main { public static ArrayList<File> getFiles(String path) { ArrayList<File> matches = new ArrayList<File>(); File folder = new File(path); File files[] = folder.listFiles(); for (File f : files) matches.add(f);//from w ww. j a va 2s.co m return matches; } public static ArrayList<File> getFiles(String path, String endian) { ArrayList<File> matches = new ArrayList<File>(); File folder = new File(path); File files[] = folder.listFiles(); for (File f : files) if (f.getName().endsWith(endian)) matches.add(f); return matches; } }