org.ow2.jonas.lib.bootstrap
Class JFileFilter

java.lang.Object
  extended by org.ow2.jonas.lib.bootstrap.JFileFilter
All Implemented Interfaces:
FileFilter

public class JFileFilter
extends Object
implements FileFilter

This class implements a FileFilter, used to list files of a directory.

Author:
Ludovic Bert, Florent Benoit

Constructor Summary
JFileFilter(String filter)
          Contruct a new JFileFilter with the specified filter.
 
Method Summary
 boolean accept(File pathname)
          Tests whether or not the specified abstract pathname should be included in a pathname list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JFileFilter

public JFileFilter(String filter)
Contruct a new JFileFilter with the specified filter.

Parameters:
filter - the filter to use. A comma-separated list of the allowed extensions. For instance ".jar,.dtd", note that ".*" is allowed.
Method Detail

accept

public boolean accept(File pathname)
Tests whether or not the specified abstract pathname should be included in a pathname list.

Specified by:
accept in interface FileFilter
Parameters:
pathname - the abstract pathname to be tested.
Returns:
true if and only if pathname should be included.


Copyright © 2010 OW2 Consortium. All Rights Reserved.