com.bristle.javalib.io
Class FileUtil.ExtensionFilenameFilter

java.lang.Object
  extended by com.bristle.javalib.io.FileUtil.ExtensionFilenameFilter
All Implemented Interfaces:
FilenameFilter
Enclosing class:
FileUtil

public static class FileUtil.ExtensionFilenameFilter
extends Object
implements FilenameFilter

This class implements FilenameFilter, filtering based on one or more filename extensions.


Field Summary
private  ArrayList m_alExtensions
           
 
Constructor Summary
FileUtil.ExtensionFilenameFilter(String strExtensions)
          Constructor.
 
Method Summary
 boolean accept(File fileDirectory, String strFilename)
          Return true or false based on whether strFileName matches any of the extensions stored internally.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_alExtensions

private ArrayList m_alExtensions
Constructor Detail

FileUtil.ExtensionFilenameFilter

public FileUtil.ExtensionFilenameFilter(String strExtensions)
Constructor.

Parameters:
strExtensions - Comma-separated list of filename extensions, with or without the leading dots. Dots are automatically prepended to extensions where not already present.
Method Detail

accept

public boolean accept(File fileDirectory,
                      String strFilename)
Return true or false based on whether strFileName matches any of the extensions stored internally.

Specified by:
accept in interface FilenameFilter
Parameters:
fileDirectory - The directory in which the file was found.
strFilename - The name of the file.