Class UploaderFileExtensionFilter


  • public class UploaderFileExtensionFilter
    extends FileFilter
    Defines which files can be selected within the Uploader's file chooser for upload to S3. Files are filtered based on their filename extension.
    Author:
    James Murty
    • Constructor Detail

      • UploaderFileExtensionFilter

        public UploaderFileExtensionFilter​(String description,
                                           List fileExtensionsList)
        Construct an extension-based file filter
        Parameters:
        description - the name for this filter, such as "Movie files"
        fileExtensionsList - a list of file extensions that the filter will accept, eg "avi", "mpg".
    • Method Detail

      • accept

        public boolean accept​(File file)
        Specified by:
        accept in class FileFilter
        Returns:
        True if the file is a Directory, or the file has an extension that matches one of the allowed extensions provided to this class's constructor. False otherwise.