if (input instanceof InputStream) {
if (useCache) {
return new FileCacheImageInputStream((InputStream) input, cacheDir);
} else {
return new MemoryCacheImageInputStream((InputStream) input);
}
}
throw new IllegalArgumentException("Output is not an instance of InputStream");