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