FileDocCategorySizeDatePackage
InputStreamImageInputStreamSpi.javaAPI DocJava SE 5 API1826Fri Aug 26 14:54:44 BST 2005com.sun.imageio.spi

InputStreamImageInputStreamSpi

public class InputStreamImageInputStreamSpi extends ImageInputStreamSpi

Fields Summary
private static final String
vendorName
private static final String
version
private static final Class
inputClass
Constructors Summary
public InputStreamImageInputStreamSpi()


      
        super(vendorName, version, inputClass);
    
Methods Summary
public booleancanUseCacheFile()

        return true;
    
public javax.imageio.stream.ImageInputStreamcreateInputStreamInstance(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();
        }
    
public java.lang.StringgetDescription(java.util.Locale locale)

        return "Service provider that instantiates a FileCacheImageInputStream or MemoryCacheImageInputStream from an InputStream";
    
public booleanneedsCacheFile()

        return false;