Here you can find the source of getImageWriter(String formatName)
private static ImageWriter getImageWriter(String formatName)
//package com.java2s; //License from project: Open Source License import java.util.Iterator; import javax.imageio.ImageIO; import javax.imageio.ImageWriter; public class Main { private static ImageWriter getImageWriter(String formatName) { Iterator<ImageWriter> it = ImageIO.getImageWritersByFormatName(formatName); if (it.hasNext()) { return it.next(); }/*w ww . j a v a2s . c o m*/ return null; } }