/Users/lyon/j4p/src/gui/htmlconverter/WildFilter.java

1    package gui.htmlconverter; 
2     
3    import java.io.File; 
4    import java.io.FilenameFilter; 
5     
6    class WildFilter implements FilenameFilter { 
7        private String suffix; 
8     
9        public WildFilter(String suffix_) { 
10           suffix = suffix_; 
11       } 
12    
13       public boolean accept(File dir, String name) { 
14           return name.endsWith(suffix); 
15       } 
16   } 
17    
18   class DirFilter implements FilenameFilter { 
19       public boolean accept(File dir, String name) { 
20           return new File(dir, name).isDirectory(); 
21       } 
22   } 
23