public class AlwaysReject extends ImageMetadataReader
A special ImageMetadataReader that will always throw an exception and reject a file.

This can be useful for debugging errors, to identify circumstances in which a ImageMetadataReader is used or not used.

Author:
Owen Feehan
  • Constructor Details

    • AlwaysReject

      public AlwaysReject()
  • Method Details

    • openFile

      public ImageMetadata openFile(Path path, StackReader defaultStackReader, OperationContext context) throws ImageIOException
      Description copied from class: ImageMetadataReader
      Opens a file containing one or more images but does not read an image.
      Specified by:
      openFile in class ImageMetadataReader
      Parameters:
      path - where the file is located.
      defaultStackReader - the default StackReader to use, if needed, and if not otherwise specified, for reading metadata.
      context - context for reading a stack from the file-system.
      Returns:
      an interface to the opened file that should be closed when no longer in use.
      Throws:
      ImageIOException - if the file cannot be read.