code: public static boolean writeImage(BufferedImage image, String formatName, OutputStream output)
              throws IOException
      {
          return writeImage(image, formatName, output, 72);
      }
docs: Writes a buffered image to a file using the given image format. See
  {@link #writeImage(BufferedImage image, String formatName,
  OutputStream output, int dpi, float quality)} for more details.
  
  @param image the image to be written
  @param formatName the target format (ex. "png")
  @param output the output stream to be used for writing
  @return true if the image file was produced, false if there was an error.
  @throws IOException if an I/O error occurs