Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.File;
- import java.io.FilenameFilter;
- public class OnlyExt implements FilenameFilter {
- String ext;
- public OnlyExt(String ext){
- this.ext = "." + ext;
- }
- public boolean accept(File dir, String name) {
- return name.endsWith(ext);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment