|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.xbus.test.FileAcceptor
public class FileAcceptor
Class FileAcceptor
implements FilenameFilter
interface to filter filenames.
Its instances are used to filter directory listings in the
File.list(java.io.FilenameFilter)
method. All file names in
the returned array must satisfy this filter.
Note: A name satisfies the filter if and only if the value true
results when the accept(File, String)
method is invoked on this
abstract pathname and the name of a file or directory in the directory that
it denotes.
Constructor Summary | |
---|---|
FileAcceptor(java.lang.String pathname)
Initializes new Filename filter for the given abstract pathname with checking it on observance of a Separator(WILDCARD) and storing the prefix and postfix of this filename in to class variables. |
Method Summary | |
---|---|
boolean |
accept(java.io.File dir,
java.lang.String filename)
Tests whether or not the specified file should be included in a file list. |
java.util.List |
getReplacements()
Returns the list with all replacements (WILDCARDS) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileAcceptor(java.lang.String pathname) throws XException
pathname
- abstract path name to be filtered
XException
- if the filename doesn't contain a seperator or has
more than one seperatorMethod Detail |
---|
public boolean accept(java.io.File dir, java.lang.String filename)
accept
in interface java.io.FilenameFilter
dir
- the directory in which the file was found.filename
- the name of the file to be tested
FilenameFilter.accept(File, String)
public java.util.List getReplacements()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |