File rootDir = new File(".");
FilenameFilter fileFilter = new SuffixFileFilter(".xml");
String[] xmlFiles = rootDir.list( fileFilter );
System.out.println( "*** XML Files" );
System.out.println( ArrayUtils.toString( xmlFiles ) );
rootDir = new File("./test");
IOFileFilter htmlFilter = new OrFileFilter( new SuffixFileFilter("htm"),
new SuffixFileFilter("html") );
IOFileFilter notDirectory = new NotFileFilter( DirectoryFileFilter.INSTANCE );
fileFilter = new AndFileFilter( htmlFilter, notDirectory );
String[] htmlFiles = rootDir.list(fileFilter);
System.out.println( "*** HTML Files" );
System.out.println( ArrayUtils.toString( htmlFiles ) );