title: ImageIO.write slow?
body: <p>I've an application where I'm writing around 25 png image files to disk every second. </p>
  
  <pre><code>BufferedImage img = getBufferedImage();
  // code below is very slow ~150ms.
  File file = new File(count++ + ".png");
  BufferedOutputStream os = new BufferedOutputStream(new FileOutputStream(file));
  ImageIO.write(img, "png", os);
  </code></pre>
  
  <p>It usually takes 150ms per call, and achieving 25fps hence becomes impossible. Can I buffer IO   so that I don't drop any frames?</p>