public class FileExtensionFilter extends Object implements FileFilter
| Constructor and Description |
|---|
FileExtensionFilter(String extension)
Creates a new instance of a
FileExtensionMatcher that will
perform a case insensitive match to this file extension. |
FileExtensionFilter(String[] extensions)
Creates a new instance of a
FileExtensionMatcher that will
perform a case insensitive match to this array of file extensions. |
FileExtensionFilter(String[] extensions,
boolean caseSensitive)
Creates a new instance of a
FileExtensionMatcher that will
perform a match to this array of file extensions. |
FileExtensionFilter(String extension,
boolean caseSensitive)
Creates a new instance of a
FileExtensionMatcher that will
perform a match to this file extension. |
public FileExtensionFilter(String extension) throws IllegalArgumentException
FileExtensionMatcher that will
perform a case insensitive match to this file extension.extension - The file extension to match against a FileIllegalArgumentException - Thrown if the file extension is not
formatted correctly such as containing a period.public FileExtensionFilter(String[] extensions) throws IllegalArgumentException
FileExtensionMatcher that will
perform a case insensitive match to this array of file extensions.extension - The array of file extensions to match against a FileIllegalArgumentException - Thrown if the file extension is not
formatted correctly such as containing a period.public FileExtensionFilter(String extension, boolean caseSensitive) throws IllegalArgumentException
FileExtensionMatcher that will
perform a match to this file extension.extension - The file extension to match against a FilecaseSensitive - If true the extension must match the case of the
provided extension, otherwise a case insensitive match will occur.IllegalArgumentException - Thrown if the file extension is not
formatted correctly such as containing a period.public FileExtensionFilter(String[] extensions, boolean caseSensitive) throws IllegalArgumentException
FileExtensionMatcher that will
perform a match to this array of file extensions.extension - The array of file extensions to match against a FilecaseSensitive - If true the extension must match the case of the
provided extension, otherwise a case insensitive match will occur.IllegalArgumentException - Thrown if the file extension is not
formatted correctly such as containing a period.public boolean accept(File file)
accept in interface FileFilterfile - The file to matchCopyright © 2012-2015 Cloudhopper by Twitter. All Rights Reserved.