Top Fields Constructors Methods
com.sun.imageio.spi

public Class InputStreamImageInputStreamSpi

extends ImageInputStreamSpi
Class Inheritance
Imports
java.io.File, .InputStream, .IOException, java.util.Locale, javax.imageio.spi.ImageInputStreamSpi, javax.imageio.stream.ImageInputStream, .FileCacheImageInputStream, .MemoryCacheImageInputStream

Field Summary

Modifier and TypeField and Description
private static final Class<?>
private static final String
private static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
canUseCacheFile()

Overrides javax.imageio.spi.ImageInputStreamSpi.canUseCacheFile.

Returns true if the ImageInputStream implementation associated with this service provider can optionally make use of a cache file for improved performance and/or memory footrprint.
public ImageInputStream
createInputStreamInstance(Object
an object of the class type returned by getInputClass.
input
,
boolean
a boolean indicating whether a cache file should be used, in cases where it is optional.
useCache
,
File
a File indicating where the cache file should be created, or null to use the system directory.
cacheDir
)

Implements abstract javax.imageio.spi.ImageInputStreamSpi.createInputStreamInstance.

Returns an instance of the ImageInputStream implementation associated with this service provider.
public String
getDescription(Locale
a Locale for which the return value should be localized.
locale
)

Implements abstract javax.imageio.spi.IIOServiceProvider.getDescription.

Returns a brief, human-readable description of this service provider and its associated implementation.
public boolean
needsCacheFile()

Overrides javax.imageio.spi.ImageInputStreamSpi.needsCacheFile.

Returns true if the ImageInputStream implementation associated with this service provider requires the use of a cache File.
Inherited from javax.imageio.spi.ImageInputStreamSpi:
createInputStreamInstancegetInputClass

Field Detail

inputClassback to summary
private static final Class<?> inputClass

Hides javax.imageio.spi.ImageInputStreamSpi.inputClass.

vendorNameback to summary
private static final String vendorName

Hides javax.imageio.spi.IIOServiceProvider.vendorName.

versionback to summary
private static final String version

Hides javax.imageio.spi.IIOServiceProvider.version.

Constructor Detail

InputStreamImageInputStreamSpiback to summary
public InputStreamImageInputStreamSpi()

Method Detail

canUseCacheFileback to summary
public boolean canUseCacheFile()

Overrides javax.imageio.spi.ImageInputStreamSpi.canUseCacheFile.

Doc from javax.imageio.spi.ImageInputStreamSpi.canUseCacheFile.

Returns true if the ImageInputStream implementation associated with this service provider can optionally make use of a cache file for improved performance and/or memory footrprint. If false, the value of the useCache argument to createInputStreamInstance will be ignored.

The default implementation returns false.

Returns:boolean

true if a cache file can be used by the input streams created by this service provider.

createInputStreamInstanceback to summary
public ImageInputStream createInputStreamInstance(Object input, boolean useCache, File cacheDir) throws IOException

Implements abstract javax.imageio.spi.ImageInputStreamSpi.createInputStreamInstance.

Doc from javax.imageio.spi.ImageInputStreamSpi.createInputStreamInstance.

Returns an instance of the ImageInputStream implementation associated with this service provider. If the use of a cache file is optional, the useCache parameter will be consulted. Where a cache is required, or not applicable, the value of useCache will be ignored.

Parameters
input:Object

an object of the class type returned by getInputClass.

useCache:boolean

a boolean indicating whether a cache file should be used, in cases where it is optional.

cacheDir:File

a File indicating where the cache file should be created, or null to use the system directory.

Returns:ImageInputStream

an ImageInputStream instance.

Exceptions
IOException:
if a cache file is needed but cannot be created.
getDescriptionback to summary
public String getDescription(Locale locale)

Implements abstract javax.imageio.spi.IIOServiceProvider.getDescription.

Doc from javax.imageio.spi.IIOServiceProvider.getDescription.

Returns a brief, human-readable description of this service provider and its associated implementation. The resulting string should be localized for the supplied Locale, if possible.

Parameters
locale:Locale

a Locale for which the return value should be localized.

Returns:String

a String containing a description of this service provider.

needsCacheFileback to summary
public boolean needsCacheFile()

Overrides javax.imageio.spi.ImageInputStreamSpi.needsCacheFile.

Doc from javax.imageio.spi.ImageInputStreamSpi.needsCacheFile.

Returns true if the ImageInputStream implementation associated with this service provider requires the use of a cache File. If true, the value of the useCache argument to createInputStreamInstance will be ignored.

The default implementation returns false.

Returns:boolean

true if a cache file is needed by the input streams created by this service provider.