List of usage examples for javax.imageio.stream FileCacheImageOutputStream FileCacheImageOutputStream
public FileCacheImageOutputStream(OutputStream stream, File cacheDir) throws IOException
From source file:jails.http.converter.BufferedImageHttpMessageConverter.java
private ImageOutputStream createImageOutputStream(OutputStream os) throws IOException { if (this.cacheDir != null) { return new FileCacheImageOutputStream(os, this.cacheDir); } else {/*ww w . ja va2 s. c o m*/ return new MemoryCacheImageOutputStream(os); } }