public class

InputStreamImageInputStreamSpi

extends ImageInputStreamSpi
java.lang.Object
   ↳ javax.imageio.spi.IIOServiceProvider
     ↳ javax.imageio.spi.ImageInputStreamSpi
       ↳ com.sun.imageio.spi.InputStreamImageInputStreamSpi

Summary

[Expand]
Inherited Fields
From class javax.imageio.spi.ImageInputStreamSpi
From class javax.imageio.spi.IIOServiceProvider
Public Constructors
InputStreamImageInputStreamSpi()
Public Methods
boolean 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.
ImageInputStream createInputStreamInstance(Object input, boolean useCache, File cacheDir)
Returns an instance of the ImageInputStream implementation associated with this service provider.
String getDescription(Locale locale)
Returns a brief, human-readable description of this service provider and its associated implementation.
boolean needsCacheFile()
Returns true if the ImageInputStream implementation associated with this service provider requires the use of a cache File.
[Expand]
Inherited Methods
From class javax.imageio.spi.ImageInputStreamSpi
From class javax.imageio.spi.IIOServiceProvider
From class java.lang.Object
From interface javax.imageio.spi.RegisterableService

Public Constructors

public InputStreamImageInputStreamSpi ()

Public Methods

public boolean 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
  • true if a cache file can be used by the input streams created by this service provider.

public ImageInputStream createInputStreamInstance (Object input, boolean useCache, File cacheDir)

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 an object of the class type returned by getInputClass.
useCache a boolean indicating whether a cache file should be used, in cases where it is optional.
cacheDir a File indicating where the cache file should be created, or null to use the system directory.
Returns
  • an ImageInputStream instance.
Throws
IOException

public String getDescription (Locale locale)

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 a Locale for which the return value should be localized.
Returns
  • a String containing a description of this service provider.

public boolean 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
  • true if a cache file is needed by the input streams created by this service provider.