Example usage for javax.imageio.stream FileCacheImageOutputStream FileCacheImageOutputStream

List of usage examples for javax.imageio.stream FileCacheImageOutputStream FileCacheImageOutputStream

Introduction

In this page you can find the example usage for javax.imageio.stream FileCacheImageOutputStream FileCacheImageOutputStream.

Prototype

public FileCacheImageOutputStream(OutputStream stream, File cacheDir) throws IOException 

Source Link

Document

Constructs a FileCacheImageOutputStream that will write to a given outputStream .

Usage

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);
    }
}