FileDocCategorySizeDatePackage
ImageInputStreamSpi.javaAPI DocAndroid 1.5 API4370Wed May 06 22:41:54 BST 2009javax.imageio.spi

ImageInputStreamSpi

public abstract class ImageInputStreamSpi extends IIOServiceProvider implements RegisterableService
The ImageInputStreamSpi abstract class is a service provider interface (SPI) for ImageInputStreams.
since
Android 1.0

Fields Summary
protected Class
inputClass
The input class.
Constructors Summary
protected ImageInputStreamSpi()
Instantiates a new ImageInputStreamSpi.

        throw new UnsupportedOperationException("Not supported yet");
    
public ImageInputStreamSpi(String vendorName, String version, Class inputClass)
Instantiates a new ImageInputStreamSpi.

param
vendorName the vendor name.
param
version the version.
param
inputClass the input class.

        super(vendorName, version);
        this.inputClass = inputClass;
    
Methods Summary
public booleancanUseCacheFile()
Returns true if the ImageInputStream can use a cache file. If this method returns false, the value of the useCache parameter of createInputStreamInstance will be ignored. The default implementation returns false.

return
true, if the ImageInputStream can use a cache file, false otherwise.

        return false; // -- def
    
public abstract javax.imageio.stream.ImageInputStreamcreateInputStreamInstance(java.lang.Object input, boolean useCache, java.io.File cacheDir)
Creates the ImageInputStream associated with this service provider. The input object should be an instance of the class returned by the getInputClass method. This method uses the specified directory for the cache file if the useCache parameter is true.

param
input the input Object.
param
useCache the flag indicating if a cache file is needed or not.
param
cacheDir the cache directory.
return
the ImageInputStream.
throws
IOException if an I/O exception has occurred.

public javax.imageio.stream.ImageInputStreamcreateInputStreamInstance(java.lang.Object input)
Creates the ImageInputStream associated with this service provider. The input object should be an instance of the class returned by getInputClass method. This method uses the default system directory for the cache file, if it is needed.

param
input the input Object.
return
the ImageInputStream.
throws
IOException if an I/O exception has occurred.

        return createInputStreamInstance(input, true, null);
    
public java.lang.ClassgetInputClass()
Gets an input Class object that represents class or interface that must be implemented by an input source.

return
the input class.

        return inputClass;
    
public booleanneedsCacheFile()
Returns true if the ImageInputStream implementation requires the use of a cache file. The default implementation returns false.

return
true, if the ImageInputStream implementation requires the use of a cache file, false otherwise.

        return false; // def