Class FileExtensionFilter

  • All Implemented Interfaces:
    FileFilter

    public class FileExtensionFilter
    extends Object
    implements FileFilter
    The FileExtensionFilter filters files in a directory depending on their extension.
    Version:
    1.0.0
    Author:
    Don Corley
    • Field Detail

      • m_rgstrIncludeExtensions

        protected String[] m_rgstrIncludeExtensions
      • m_rgstrExcludeExtensions

        protected String[] m_rgstrExcludeExtensions
    • Constructor Detail

      • FileExtensionFilter

        public FileExtensionFilter​(String[] rgstrIncludeExtensions,
                                   String[] rgstrExcludeExtensions)
        Creates new FileExtensionFilter
    • Method Detail

      • accept

        public boolean accept​(File pathname)
        Tests whether or not the specified abstract pathname should be included in a pathname list.
        Specified by:
        accept in interface FileFilter
        Parameters:
        pathname - The abstract pathname to be tested
        Returns:
        true if and only if pathname should be included