public javax.imageio.stream.ImageInputStream | createInputStreamInstance(java.lang.Object input, boolean useCache, java.io.File cacheDir)
if (input instanceof InputStream) {
InputStream is = (InputStream)input;
if (useCache) {
return new FileCacheImageInputStream(is, cacheDir);
} else {
return new MemoryCacheImageInputStream(is);
}
} else {
throw new IllegalArgumentException();
}
|