cynosurex.io
Class FileSpecFilter

java.lang.Object
  extended by cynosurex.io.FileSpecFilter
All Implemented Interfaces:
java.io.FilenameFilter

public class FileSpecFilter
extends java.lang.Object
implements java.io.FilenameFilter

This FilenameFilter allows the matching of files with '*' and '?' that are normal on the command-line.

Version:
1.0
Author:
Chieh Cheng

Constructor Summary
FileSpecFilter(java.lang.String fileSpec)
          Constructor.
 
Method Summary
 boolean accept(java.io.File dir, java.lang.String fileName)
          This method called by the File object to determine whether to accept a filename.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSpecFilter

public FileSpecFilter(java.lang.String fileSpec)
Constructor.

Parameters:
fileSpec - The file spec to match.
Method Detail

accept

public boolean accept(java.io.File dir,
                      java.lang.String fileName)
This method called by the File object to determine whether to accept a filename.

Specified by:
accept in interface java.io.FilenameFilter
Parameters:
dir - The directory where the file is located.
fileName - The name of the file.