|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.armatiek.infofuze.stream.filesystem.filefilter.SuffixFileFilter
public class SuffixFileFilter
Filters files based on the suffix (what the filename ends with).
This is used in retrieving all the files of a particular type.
Based on code from Apache Commons IO version 2.01.
The main difference is that this class filters objects that
implement FileIf,
not File.
Original author Stephen Colebourne, Federico Barbieri,
Serge Knystautas, Peter Donald
| Constructor Summary | |
|---|---|
SuffixFileFilter(java.util.List<java.lang.String> suffixes)
Constructs a new Suffix file filter for a list of suffixes. |
|
SuffixFileFilter(java.util.List<java.lang.String> suffixes,
org.apache.commons.io.IOCase caseSensitivity)
Constructs a new Suffix file filter for a list of suffixes specifying case-sensitivity. |
|
SuffixFileFilter(java.lang.String suffix)
Constructs a new Suffix file filter for a single extension. |
|
SuffixFileFilter(java.lang.String[] suffixes)
Constructs a new Suffix file filter for an array of suffixs. |
|
SuffixFileFilter(java.lang.String[] suffixes,
org.apache.commons.io.IOCase caseSensitivity)
Constructs a new Suffix file filter for an array of suffixs specifying case-sensitivity. |
|
SuffixFileFilter(java.lang.String suffix,
org.apache.commons.io.IOCase caseSensitivity)
Constructs a new Suffix file filter for a single extension specifying case-sensitivity. |
|
| Method Summary | |
|---|---|
boolean |
accept(FileIf file)
Checks to see if the filename ends with the suffix. |
java.lang.String |
toString()
Provide a String representaion of this file filter. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SuffixFileFilter(java.lang.String suffix)
suffix - the suffix to allow, must not be null
java.lang.IllegalArgumentException - if the suffix is null
public SuffixFileFilter(java.lang.String suffix,
org.apache.commons.io.IOCase caseSensitivity)
suffix - the suffix to allow, must not be nullcaseSensitivity - how to handle case sensitivity, null means case-sensitive
java.lang.IllegalArgumentException - if the suffix is nullpublic SuffixFileFilter(java.lang.String[] suffixes)
The array is not cloned, so could be changed after constructing the instance. This would be inadvisable however.
suffixes - the suffixes to allow, must not be null
java.lang.IllegalArgumentException - if the suffix array is null
public SuffixFileFilter(java.lang.String[] suffixes,
org.apache.commons.io.IOCase caseSensitivity)
The array is not cloned, so could be changed after constructing the instance. This would be inadvisable however.
suffixes - the suffixes to allow, must not be nullcaseSensitivity - how to handle case sensitivity, null means case-sensitive
java.lang.IllegalArgumentException - if the suffix array is nullpublic SuffixFileFilter(java.util.List<java.lang.String> suffixes)
suffixes - the suffixes to allow, must not be null
java.lang.IllegalArgumentException - if the suffix list is null
java.lang.ClassCastException - if the list does not contain Strings
public SuffixFileFilter(java.util.List<java.lang.String> suffixes,
org.apache.commons.io.IOCase caseSensitivity)
suffixes - the suffixes to allow, must not be nullcaseSensitivity - how to handle case sensitivity, null means case-sensitive
java.lang.IllegalArgumentException - if the suffix list is null
java.lang.ClassCastException - if the list does not contain Strings| Method Detail |
|---|
public boolean accept(FileIf file)
accept in interface IOFileFilterfile - the File to check
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||