if (provider instanceof ImageReaderSpi)
if (provider instanceof ImageWriterSpi)
    public boolean filter(Object provider)    {      if (provider instanceof ImageReaderSpi)	{	  ImageReaderSpi spi = (ImageReaderSpi) provider;	  String[] formatNames = spi.getFormatNames();	  	  for (int i = formatNames.length - 1; i >= 0; --i)	    if (formatName.equals(formatNames[i]))	      return true;	}      return false;    }