The im4java Library, Version 1.4.0

org.im4java.utils
Class ExtensionFilter

java.lang.Object
  extended by org.im4java.utils.BaseFilter
      extended by org.im4java.utils.ExtensionFilter
All Implemented Interfaces:
java.io.FilenameFilter

public class ExtensionFilter
extends BaseFilter

This utility-class implements a FilenameFilter based on extensions. The comparison ignores the case of the extension.

Since:
1.1.0
Version:
$Revision: 1.6 $
Author:
$Author: bablokb $

Field Summary
static ExtensionFilter RAW_IMAGES
          A filter for raw-image types (the list is taken from Wikipedia, see http://en.wikipedia.org/wiki/Raw_image_format).
static ExtensionFilter STANDARD_IMAGES
          A filter for standard-image types (jpg, tif, png, gif and bmp).
 
Constructor Summary
ExtensionFilter(java.util.Collection<java.lang.String> pExt)
          Constructor (pass the extensions as a collection);
ExtensionFilter(java.lang.String... pExt)
          Constructor (pass the extensions as array or as String-arguments).
 
Method Summary
 boolean accept(java.io.File dir, java.lang.String name)
          Implement the accect-method of FilenameFilter
 
Methods inherited from class org.im4java.utils.BaseFilter
acceptDir, ignoreDotDirs, setRecursion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STANDARD_IMAGES

public static final ExtensionFilter STANDARD_IMAGES
A filter for standard-image types (jpg, tif, png, gif and bmp).


RAW_IMAGES

public static final ExtensionFilter RAW_IMAGES
A filter for raw-image types (the list is taken from Wikipedia, see http://en.wikipedia.org/wiki/Raw_image_format).

Constructor Detail

ExtensionFilter

public ExtensionFilter(java.lang.String... pExt)
Constructor (pass the extensions as array or as String-arguments).


ExtensionFilter

public ExtensionFilter(java.util.Collection<java.lang.String> pExt)
Constructor (pass the extensions as a collection);

Method Detail

accept

public boolean accept(java.io.File dir,
                      java.lang.String name)
Implement the accect-method of FilenameFilter

See Also:
FilenameFilter.accept(java.io.File, java.lang.String)

The im4java Library, Version 1.4.0

Released under the LGPL, (c) Bernhard Bablok 2008-2010
Homepage: http://im4java.sourceforge.net/