01: package vqwiki.file;
02:
03: import java.io.File;
04: import java.io.FilenameFilter;
05:
06: /**
07: * @author garethc
08: * Date: 5/03/2003
09: */
10: public class FileExtensionFilter implements FilenameFilter {
11:
12: String extension;
13:
14: /**
15: *
16: */
17: public FileExtensionFilter(String extension) {
18: this .extension = extension;
19: }
20:
21: /**
22: *
23: */
24: public boolean accept(File file, String name) {
25: return (name.endsWith(extension));
26: }
27: }
|