com.partnersoft.io
Class FileExtensionFilter

java.lang.Object
  extended by com.partnersoft.io.FileExtensionFilter
All Implemented Interfaces:
Immutable, java.io.FilenameFilter

public class FileExtensionFilter
extends java.lang.Object
implements java.io.FilenameFilter, Immutable

A filename filter that accepts only files with the given extension.

Extensions are compared case-insensitively.

Copyright 2006 Partner Software, Inc.

Version:
$Id: FileExtensionFilter.java 1012 2007-11-24 18:30:02Z paul $
Author:
Paul Reavis

Constructor Summary
FileExtensionFilter(java.lang.String extension)
          Constructs an ExtensionFilter with the given extension.
 
Method Summary
 boolean accept(java.io.File dir, java.lang.String name)
           
 java.lang.String getExtension()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileExtensionFilter

public FileExtensionFilter(java.lang.String extension)
Constructs an ExtensionFilter with the given extension. Extension should include the period (e.g. ".txt");

Method Detail

accept

public boolean accept(java.io.File dir,
                      java.lang.String name)
Specified by:
accept in interface java.io.FilenameFilter

getExtension

public java.lang.String getExtension()