@Override public boolean accept(File file){
  if (file.isDirectory()) {
    return true;
  }
  String fileExt=getExtension(file);
  if (fileExt == null) {
    return false;
  }
  for (int i=0; i < exts.length; i++) {
    String ext=exts[i];
    if (fileExt.equalsIgnoreCase(ext)) {
      return true;
    }
  }
  return false;
}

@ Override public boolean accept ( File file ) { if ( file . isDirectory ( ) ) { return true ; } String fileExt = getExtension ( file ) ; if ( fileExt == null ) { return false ; } for ( int i = 0 ; i < exts . length ; i ++ ) { String ext = exts [ i ] ; if ( fileExt . equalsIgnoreCase ( ext ) ) { return true ; } } return false ; }
does the supplied file match the filter ?
