uk.ac.ebi.adfconverter.library
Class FileFilter

java.lang.Object
  extended byuk.ac.ebi.adfconverter.library.FileFilter
All Implemented Interfaces:
java.io.FilenameFilter

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

implements java.io.FilenameFilter interface. Uses to filter files in a directory following the extensio

Since:
20 08 04
Version:
$Revision: 1 $
Author:
Pierre MARGUERITE

Constructor Summary
FileFilter()
          contructor of a filter to filtre only file without extension
FileFilter(java.lang.String[] extensions)
          contructor of a filter to filtre on ly file with the given extensio
 
Method Summary
 boolean accept(java.io.File dir, java.lang.String name)
          retrieved if a file accepted by the filter.
 void addExtension(java.lang.String extension)
          Adds authorise file extension
static void main(java.lang.String[] args)
          for testing purpose retrieves file in the current directory with a given file extension
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileFilter

public FileFilter()
contructor of a filter to filtre only file without extension


FileFilter

public FileFilter(java.lang.String[] extensions)
contructor of a filter to filtre on ly file with the given extensio

Parameters:
extensions - array of accepted extensions
Method Detail

accept

public boolean accept(java.io.File dir,
                      java.lang.String name)
retrieved if a file accepted by the filter. Implements accept method from Interface

Specified by:
accept in interface java.io.FilenameFilter
Parameters:
dir - path to the directory containing the file to test
name - the name of the file to test
Returns:
true, if the filter accepts the file. false , otherwise

addExtension

public void addExtension(java.lang.String extension)
Adds authorise file extension

Parameters:
extension - nex file extensioin to authorise

main

public static void main(java.lang.String[] args)
for testing purpose retrieves file in the current directory with a given file extension

Parameters:
args -


European Bioinformatics InstituteMicroarray Informatics Team