|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.groboutils.util.io.v1.ExtensionFilenameFilter
net.sourceforge.groboutils.util.io.v1.ExtensionFileFilter
Allows files with the given extention(s) to be accepted. You can also specify whether directories are allowed or not. This filter is case insensitive or sensitive, depending on the settings.
The extension strings passed in are the end-of-name Strings, meaning that each file must match at least one given string at the end. So, if you want to match all "DOC" files, pass in ".doc" to match.
By default, directories are allowed, independent of their names. If directories are not allowed, then the directory names must match the extension list.
Constructor Summary | |
ExtensionFileFilter()
Default Constructor. |
|
ExtensionFileFilter(boolean caseInsensitive)
|
|
ExtensionFileFilter(java.lang.String extension)
Specify a single "end string" to match. |
|
ExtensionFileFilter(java.lang.String[] exts)
Slow, but it works. |
|
ExtensionFileFilter(java.lang.String[] exts,
boolean caseInsensitive)
|
|
ExtensionFileFilter(java.lang.String extension,
boolean caseInsensitive)
|
Method Summary | |
boolean |
accept(java.io.File pathname)
Accepts some files. |
Methods inherited from class net.sourceforge.groboutils.util.io.v1.ExtensionFilenameFilter |
accept, addExtension, allowsDirectories, allowsDirectories, isCaseInsensitive, matches |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ExtensionFileFilter()
public ExtensionFileFilter(java.lang.String extension)
public ExtensionFileFilter(java.lang.String[] exts)
Slow, but it works.
public ExtensionFileFilter(boolean caseInsensitive)
public ExtensionFileFilter(java.lang.String extension, boolean caseInsensitive)
public ExtensionFileFilter(java.lang.String[] exts, boolean caseInsensitive)
Method Detail |
public boolean accept(java.io.File pathname)
accept
in interface java.io.FileFilter
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |