Class UNCFileFilter

java.lang.Object
javax.swing.filechooser.FileFilter
com.xinapse.multisliceimage.UNC.UNCFileFilter

public final class UNCFileFilter extends FileFilter
A file filter for UNC images. The accept method returns true if the file starts with the UNC Magic Number.
  • Field Details

    • INSTANCE

      public static final UNCFileFilter INSTANCE
      The only instance of a UNCFileFilter.
  • Method Details

    • getDescription

      public String getDescription()
      Returns "UNC Images".
      Specified by:
      getDescription in class FileFilter
      Returns:
      the description String "UNC Images".
    • accept

      public boolean accept(File file)
      Tests whether the given file probably represents a UNC image file. Tests whether the file starts with the UNC Magic Number. Also passes directories to allow navigation while looking for UNC images.
      Specified by:
      accept in class FileFilter
      Parameters:
      file - the file to test.
      Returns:
      true if the supplied file is probably a UNC image file, or a directory. Returns false otherwise.