jtools
Class FileExtensionFilter
java.lang.Object
jtools.FileExtensionFilter
- All Implemented Interfaces:
- java.io.FilenameFilter
public class FileExtensionFilter
- extends java.lang.Object
- implements java.io.FilenameFilter
Filters a file name by the specified extension.
The provided extension string must NOT contain the
'.' (full stop, period, dot) characters.
- Version:
- 1.00 - 2006/02/10
- Author:
- support@phillipgriffin.com
|
Constructor Summary |
FileExtensionFilter(java.lang.String extension)
Adds a full stop character (".") to a file name extension string. |
|
Method Summary |
boolean |
accept(java.io.File dir,
java.lang.String name)
Adds a full stop character (".") to a file name extension string. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileExtensionFilter
public FileExtensionFilter(java.lang.String extension)
- Adds a full stop character (".") to a file name extension string.
- Parameters:
extension - a file name extension; the text
that normally follows a full stop
character (period, dot) in a file
name
accept
public boolean accept(java.io.File dir,
java.lang.String name)
- Adds a full stop character (".") to a file name extension string.
- Specified by:
accept in interface java.io.FilenameFilter
- Parameters:
dir - an abstract representation of file
pathnamesname - a string containing a file name
- Returns:
- the extension portion of a file name
Copyright © 2005-2006 GRIFFIN Consulting. All Rights Reserved.