Class FilenameExtensionFilter

java.lang.Object
com.peterphi.std.io.filter.FilenameExtensionFilter
All Implemented Interfaces:
FileFilter

public class FilenameExtensionFilter extends Object implements FileFilter
A FileFilter which matches files by their extensions
  • Constructor Details

    • FilenameExtensionFilter

      @Deprecated public FilenameExtensionFilter(String extension, boolean caseSensitive)
      Deprecated.
      use boolean caseSensitive,String... extensions constructor instead
      Creates a FilenameExtensionFilter with a single extension
      Parameters:
      extension - the extension without the dot (e.g. "zip" should be used as the extension for zip files, "tar.gz" should be used as the extension for tar.gz files)
      caseSensitive - true if matches should be case sensitive, otherwise false to perform case insensitive matching
    • FilenameExtensionFilter

      @Deprecated public FilenameExtensionFilter(Iterable<String> extensions, boolean caseSensitive)
      Deprecated.
      use boolean caseSensitive,Iterable extensions constructor instead
      Creates a FilenameExtensionFilter with a set of extensions
      Parameters:
      extensions - the extensions without the dot (e.g. "zip" should be used as the extension for zip files, "tar.gz" should be used as the extension for tar.gz files)
      caseSensitive - true if matches should be case sensitive, otherwise false to perform case insensitive matching
    • FilenameExtensionFilter

      public FilenameExtensionFilter(boolean caseSensitive, String... extensions)
      Creates a FilenameExtensionFilter with a set of extensions
      Parameters:
      caseSensitive - true if matches should be case sensitive, otherwise false to perform case insensitive matching
      extensions - the extensions without the dot (e.g. "zip" should be used as the extension for zip files, "tar.gz" should be used as the extension for tar.gz files)
    • FilenameExtensionFilter

      public FilenameExtensionFilter(String... extensions)
      Creates a case insensitive FilenameExtensionFilter with a set of extensions
      Parameters:
      extensions - the extensions without the dot (e.g. "zip" should be used as the extension for zip files, "tar.gz" should be used as the extension for tar.gz files)
    • FilenameExtensionFilter

      public FilenameExtensionFilter(Iterable<String> extensions)
      Creates a case insensitive FilenameExtensionFilter with a set of extensions
      Parameters:
      extensions - the extensions without the dot (e.g. "zip" should be used as the extension for zip files, "tar.gz" should be used as the extension for tar.gz files)
    • FilenameExtensionFilter

      public FilenameExtensionFilter(boolean caseSensitive, Iterable<String> extensions)
      Creates a FilenameExtensionFilter with a set of extensions
      Parameters:
      caseSensitive - true if matches should be case sensitive, otherwise false to perform case insensitive matching
      extensions - the extensions without the dot (e.g. "zip" should be used as the extension for zip files, "tar.gz" should be used as the extension for tar.gz files)
  • Method Details