LOGGER.log(Level.FINE, "Writing file in a temporary folder");
}
final File output = resourceManager.getTemporaryFile("." + extension);
// the limit output stream will throw an exception if the process is trying to writer more than the max allowed bytes
final FileImageOutputStreamExtImpl fileImageOutputStreamExtImpl = new FileImageOutputStreamExtImpl(
output);
ImageOutputStream os = null;
// write
try {
// If limit is defined, LimitedImageOutputStream is used