KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > lutris > appserver > server > httpPresentation > servlet > ArchiveFilter


1 /*
2  * Contributor(s):
3  *
4  * $Id: ArchiveFilter.java,v 1.2 2005/03/24 10:51:16 slobodan Exp $
5  */

6
7 package com.lutris.appserver.server.httpPresentation.servlet;
8   
9 import java.io.File JavaDoc;
10 import java.io.FileFilter 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