List<String> supportedMimeTypes, List<String> writerSpi, Map<String, String> inputParams,ImageIOInitializer initializer) {
this.isAggressiveOutputStreamSupported = aggressiveOutputStreamOptimization;
this.supportedMimeTypes = new ArrayList<String>(supportedMimeTypes);
this.inputParams = inputParams;
// Get the IIORegistry if needed
IIORegistry theRegistry = initializer.getRegistry();
// Checks for each Spi class if it is present and then it is added to the list.
for (String spi : writerSpi) {
try {
Class<?> clazz = Class.forName(spi);
ImageWriterSpi writer = (ImageWriterSpi) theRegistry
.getServiceProviderByClass(clazz);
if (writer != null) {
this.spi = writer;
break;
}