Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/flexstor/common/io/xfile/filters/XExtFilter.java


1   /*
2    * XExtFilter.java
3    *
4    * Copyright $Date: 2003/08/11 02:22:47 $ FLEXSTOR.net Inc.
5    *
6    * This work is licensed for use and distribution under license terms found at
7    * http://www.flexstor.org/license.html
8    *
9    */
10  
11  package com.flexstor.common.io.xfile.filters;
12  
13  import com.flexstor.common.io.xfile.FlexXFile;
14  import com.flexstor.common.io.xfile.XFilenameFilter;
15  
16  /**
17  * XExtFilter
18  * A FileNameFilter used to filter out files based on the given extension.
19  * (e.g. files ending with .cfg would be filtered by new ExtFilter("cfg") )
20  **/
21  
22  public class XExtFilter
23     extends XFilenameFilter
24  {
25     public String sExtension;
26  
27     public XExtFilter(String sExtension)
28     {
29        this.sExtension = sExtension;
30     }
31  
32     // Subclasses don't need to implement the logic for this method; just return true
33     // The real implementation is in the subclasses implementing XFilenameFilterI
34     public boolean accept(FlexXFile dir, String name) { return true; }
35  }