KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > kelp > eclipse > enhydraWizard > ArchiveFilter


1 /*
2  * Contributor(s):
3  *
4  * $Id: ArchiveFilter.java,v 1.1 2005/01/11 12:07:03 slobodan Exp $
5  */

6
7 package org.enhydra.kelp.eclipse.enhydraWizard;
8   
9 import java.io.FileFilter JavaDoc;
10 import java.io.File JavaDoc;
11
12 public class ArchiveFilter implements FileFilter JavaDoc {
13
14     public ArchiveFilter() {
15     }
16
17     public boolean accept(File JavaDoc pathname) {
18         
19         boolean accepted = false;
20         if (pathname.isFile()) {
21             if (pathname.getName().endsWith(".jar")
22                || pathname.getName().endsWith(".zip") ) {
23                 accepted = true;
24             }
25         }
26         return accepted;
27         }
28
29 }
30
Popular Tags