code: @Override
      public void setInput(final Object input, final boolean seekForwardOnly, final boolean ignoreMetadata) {
          resetMembers();
          super.setInput(input, seekForwardOnly, ignoreMetadata);
  
          if (input instanceof ImageInputStream) {
              imageInput = (ImageInputStream) input;
          }
          else {
              imageInput = null;
          }
      }
docs: Overrides {@code setInput}, to allow easy access to the input, in case
  it is an {@code ImageInputStream}.
  
  @param input the {@code ImageInputStream} or other
  {@code Object} to use for future decoding.
  @param seekForwardOnly if {@code true}, images and metadata
  may only be read in ascending order from this input source.
  @param ignoreMetadata if {@code true}, metadata
  may be ignored during reads.
  
  @exception IllegalArgumentException if {@code input} is
  not an instance of one of the classes returned by the
  originating service provider's {@code getInputTypes}
  method, or is not an {@code ImageInputStream}.
  
  @see ImageInputStream