code: public boolean accept(File file) {
          // extract this file's extension
          String fileExt = FileUtil.parseFileExtension(file.getName());
  
          // a file extension might not have existed
          if (fileExt == null) {
              // if no file extension extracted, this definitely is not a match
              return false;
          }
  
          // does it match our list of acceptable file extensions?
          for (String extension : extensions) {
              if (caseSensitive) {
                  if (fileExt.equals(extension)) {
                      return true;
                  }
              } else {
                  if (fileExt.equalsIgnoreCase(extension)) {
                      return true;
                  }
              }
          }
          
          // if we got here, then no match was found
          return false;
      }
docs: Accepts a File by its file extension.
  @param file The file to match
  @return True if the File matches this the array of acceptable file
  extensions.