Package bb.io.filefilter

Provides classes that may be used for file filtering.

See:
          Description

Interface Summary
FileFilterListener Defines callback methods for a listener class interested in File accept/reject events.
 

Class Summary
BaseFilter Abstract base class for other File filter implementations that defines some common functionality.
BaseFilter.UnitTest See the Overview page of the project's javadocs for a general description of this unit test class.
BaseFilter.UnitTest.TestFilter  
CameraFileFilter File filter that accepts files generated by a digital camera.
ClassFilter File filter that accepts Java class files.
CompoundFilter Meta filter whose accept method incorporates all the constraints of all the file filters that it was constructed with.
CompoundFilter.UnitTest See the Overview page of the project's javadocs for a general description of this unit test class.
CompoundFilter.UnitTest.TestFilter  
CompoundFilter.UnitTest.TestFilter0  
CompoundFilter.UnitTest.TestFilter1  
DirectoryFilter File filter that accepts directories.
FilterUtil Provides static utility methods for dealing with file filters.
HtmlFilter File filter that accepts html files.
JarFilter File filter that accepts Java Archive files.
JarOrZipFilter File filter that accepts ZIP or Java Archive files.
JavaFilter File filter that accepts Java source code files.
NormalFileFilter File filter that accepts files.
RegexFilter Accepts any File which matches a set of regular expressions.
RegexFilter.UnitTest See the Overview page of the project's javadocs for a general description of this unit test class.
SoundFileFilter File filter that accepts sound files.
SuffixFilter Subclass of RegexFilter that makes it convenient to match Files based on their endings.
SuffixFilter.UnitTest See the Overview page of the project's javadocs for a general description of this unit test class.
TarableFilter Filter that accepts everything which passes TarUtil.isTarable.
TarFilter File filter that accepts TAR Archive files.
VisibleFilter File filter that accepts all visible normal files and directories, and rejects all hidden ones as well as other file system elements.
VisibleOrRootFilter Subclass of VisibleFilter that additionally accepts Files which are system roots.
ZipFilter File filter that accepts ZIP Archive files.
ZippableFilter Filter that accepts everything which passes ZipUtil.isZipable.
 

Enum Summary
CompoundFilter.LogicMode Enum of all the supported modes for applying the individual filters.
DirectoryMode Enum of all the ways that directories can be handled by a filter.
FileMode Enum of all the ways that normal files can be handled by a filter.
OtherMode Enum of all the ways that "other" file system elements can be handled by a filter.
PartMode Enum of the different parts of a File's path which can be extracted and subjected to a filter's test.
 

Package bb.io.filefilter Description

Provides classes that may be used for file filtering.

To understand this package, first examine the BaseFilter class, since almost every file filter implementation here suclasses it. (One exception is CompoundFilter). Then examine these important subclasses of BaseFilter: RegexFilter, and its subclass SuffixFilter.

The reason why so many specific SuffixFilter subclasses exist (e.g. ClassFilter, JarFilter, JavaFilter, etc) is twofold. First, these filters are common enough that it is nice to not require users to implement them every time. Second, several of my classes allow file filters to be specified as command line arguments, and it is very convenient to only have to specify the filter class name with no other parameters. (The alternative, if specified SuffixFilter's class name along with a list of suffixes, would require custom parsing code to be written.)