Iterator iter = iioRegistry.getServiceProviders(spiClass,
true); // useOrdering
String formatNames[];
ImageReaderWriterSpi provider;
String desc = "standard " + formatName + descPart;
String jiioPath = "com.sun.media.imageioimpl";
Locale locale = Locale.getDefault();
ArrayList list = new ArrayList();
while (iter.hasNext()) {
provider = (ImageReaderWriterSpi)iter.next();
// Look for JDK core ImageWriterSpi's
if (provider.getVendorName().startsWith("Sun Microsystems") &&
desc.equalsIgnoreCase(provider.getDescription(locale)) &&
// not JAI Image I/O plugins
!provider.getPluginClassName().startsWith(jiioPath)) {
// Get the formatNames supported by this Spi
formatNames = provider.getFormatNames();
for (int i=0; i<formatNames.length; i++) {
if (formatNames[i].equalsIgnoreCase(formatName)) {
// Must be a JDK provided ImageReader/ImageWriter
list.add(provider);
break;