Package com.peterphi.std.io.filter
Class FilenameExtensionFilter
java.lang.Object
com.peterphi.std.io.filter.FilenameExtensionFilter
- All Implemented Interfaces:
FileFilter
A FileFilter which matches files by their extensions
-
Constructor Summary
ConstructorDescriptionFilenameExtensionFilter
(boolean caseSensitive, Iterable<String> extensions) Creates a FilenameExtensionFilter with a set of extensionsFilenameExtensionFilter
(boolean caseSensitive, String... extensions) Creates a FilenameExtensionFilter with a set of extensionsFilenameExtensionFilter
(Iterable<String> extensions) Creates a case insensitive FilenameExtensionFilter with a set of extensionsFilenameExtensionFilter
(Iterable<String> extensions, boolean caseSensitive) Deprecated.FilenameExtensionFilter
(String... extensions) Creates a case insensitive FilenameExtensionFilter with a set of extensionsFilenameExtensionFilter
(String extension, boolean caseSensitive) Deprecated.useboolean caseSensitive,String...
-
Method Summary
-
Constructor Details
-
FilenameExtensionFilter
Deprecated.useboolean caseSensitive,String... extensions
constructor insteadCreates 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.useboolean caseSensitive,Iterable
constructor insteadextensions 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
Creates a FilenameExtensionFilter with a set of extensions- Parameters:
caseSensitive
- true if matches should be case sensitive, otherwise false to perform case insensitive matchingextensions
- 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
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
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
Creates a FilenameExtensionFilter with a set of extensions- Parameters:
caseSensitive
- true if matches should be case sensitive, otherwise false to perform case insensitive matchingextensions
- 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
-
accept
-
accept
- Specified by:
accept
in interfaceFileFilter
- See Also:
-
accept
-
boolean caseSensitive,Iterable extensions
constructor instead