|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mindprod.filter.ExtensionListFilter
public final class ExtensionListFilter
Select a file based on it matches one of list of extensions.
Does not work with directories, see DirListFilter. see also FileListFilter and ClamFilter. Rejects all directories.
Field Summary | |
---|---|
static boolean |
DEBUGGING
true if debugging. |
Constructor Summary | |
---|---|
ExtensionListFilter(boolean invert,
java.lang.String... want)
constructor |
|
ExtensionListFilter(java.lang.String... want)
constructor |
Method Summary | |
---|---|
boolean |
accept(java.io.File dir,
java.lang.String name)
Select only Files with an extension in our want list |
static void |
main(java.lang.String[] args)
TEST harness |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean DEBUGGING
Constructor Detail |
---|
public ExtensionListFilter(java.lang.String... want)
want
- Array of simple file extension names, case insensitive, e.g. new String["html", "txt", "bat" ];public ExtensionListFilter(boolean invert, java.lang.String... want)
invert
- if true, selects files not in the list instead.want
- Array of simple file extension names, case insensitive, e.g. new String["html", "txt", "bat" ];Method Detail |
---|
public boolean accept(java.io.File dir, java.lang.String name)
accept
in interface java.io.FilenameFilter
dir
- the directory in which the file was found.name
- the name of the file
public static void main(java.lang.String[] args)
args
- not used
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |