public boolean accept ( File f ) { if ( f . isDirectory ( ) ) { return false ; } String name = f . getName ( ) . toLowerCase ( ) ; return name . endsWith ( ".pdf" ) ; }
Judges whether a file is a PDF document or not