Search in sources :

Example 1 with PNGImageWriter

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();
}
Also used : PNGImageWriter(com.sun.imageio.plugins.png.PNGImageWriter) PNGImageWriter(com.sun.imageio.plugins.png.PNGImageWriter) ImageWriter(javax.imageio.ImageWriter) File(java.io.File) ImageOutputStream(javax.imageio.stream.ImageOutputStream)

Aggregations

PNGImageWriter (com.sun.imageio.plugins.png.PNGImageWriter)1 File (java.io.File)1 ImageWriter (javax.imageio.ImageWriter)1 ImageOutputStream (javax.imageio.stream.ImageOutputStream)1