}
Iterator<ImageInputStreamSpi> it = registry.getServiceProviders(ImageInputStreamSpi.class, true);
while (it.hasNext()) {
ImageInputStreamSpi spi = it.next();
if (spi.getInputClass().isInstance(input)) {
return getUseCache() ?
spi.createInputStreamInstance(input, true, getCacheDirectory()) :
spi.createInputStreamInstance(input);
}
}
return null;
}