use of com.sun.imageio.plugins.png.PNGImageWriter in project jdk8u_jdk by JetBrains.
the class SetOutput method main.
public static void main(String[] args) throws IOException {
ImageWriter iw = new PNGImageWriter(null);
File f = File.createTempFile("imageio", "tmp");
ImageOutputStream ios = ImageIO.createImageOutputStream(f);
try {
iw.setOutput(ios);
} catch (NullPointerException npe) {
f.delete();
throw new RuntimeException("Got NullPointerException!");
}
f.delete();
}
Aggregations