bb.io.filefilter
Class CameraFileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by bb.io.filefilter.BaseFilter
          extended by bb.io.filefilter.RegexFilter
              extended by bb.io.filefilter.SuffixFilter
                  extended by bb.io.filefilter.CameraFileFilter
All Implemented Interfaces:
FileFilter

public class CameraFileFilter
extends SuffixFilter

File filter that accepts files generated by a digital camera.

Specificly, this file filter accepts only normal files whose names end with the following extensions (case irrelevant):

  1. .avi
  2. .jpeg
  3. .jpg
  4. .mov
  5. .mp4
  6. .thm
Directories and other file system elements are always rejected, which could affect directory drill down (see DirUtil.getTree and DirUtil.getFilesInTree).

For discussion of the .avi & .thm files produced by Canon digital cameras see

  1. http://photography-on-the.net/forum/viewtopic.php?TopicID=6334
  2. http://www.extensis.com/portfolio/31j.html#raw11
Summary: .thm files are .jpg files (with some optional extra textual information too?) meant for thumbnails.

This class is multithread safe: it is immutable. In particular, it maintains its ancestor class's immutability.

Author:
Brent Boyer

Nested Class Summary
 
Nested classes/interfaces inherited from class bb.io.filefilter.SuffixFilter
SuffixFilter.UnitTest
 
Constructor Summary
CameraFileFilter()
          Constructs a new CameraFileFilter instance; directories are accepted.
 
Method Summary
 String getDescription()
           The implementation here has some introductory text, followed by a comma separated list of all of the regexes present in RegexFilter.patterns.
 
Methods inherited from class bb.io.filefilter.SuffixFilter
getDescriptionIntro, getSuffixes, toPatternLiterals
 
Methods inherited from class bb.io.filefilter.RegexFilter
getPatterns, passesTest, toPatterns, toSet
 
Methods inherited from class bb.io.filefilter.BaseFilter
accept, acceptImpl, extractPart, getDirectoryMode, getFileMode, getListener, getOtherMode, getPartMode, passesTest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CameraFileFilter

public CameraFileFilter()
Constructs a new CameraFileFilter instance; directories are accepted.

Method Detail

getDescription

public String getDescription()
Description copied from class: SuffixFilter

The implementation here has some introductory text, followed by a comma separated list of all of the regexes present in RegexFilter.patterns.

The implementation here has some introductory text, followed by a comma separated list of the suffixes.

Overrides:
getDescription in class SuffixFilter