ImageInputStreams. For more information on service
provider interfaces, see the class comment for the
IIORegistry class.
This interface allows arbitrary objects to be "wrapped" by
instances of ImageInputStream. For example,
a particular ImageInputStreamSpi might allow
a generic InputStream to be used as an input source;
another might take input from a URL.
By treating the creation of ImageInputStreams as a
pluggable service, it becomes possible to handle future input
sources without changing the API. Also, high-performance
implementations of ImageInputStream (for example,
native implementations for a particular platform) can be installed
and used transparently by applications.
IIORegistry, javax.imageio.stream.ImageInputStream
| Modifier and Type | Field and Description |
|---|---|
| protected Class | inputClass
A |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | ImageInputStreamSpi(String
the vendor name. vendorName, String a version identifier. version, Class<?> a inputClass)Class object indicating the
legal object type for use by the
createInputStreamInstance method.Constructs an |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if a cache file can be used by the
input streams created by this service provider.Returns |
| public abstract ImageInputStream | Returns: anImageInputStream instance.an object of the class type returned by
input, boolean getInputClass.a useCache, File boolean indicating whether a
cache file should be used, in cases where it is optional.a cacheDir)File indicating where the
cache file should be created, or null to use the
system directory.Returns an instance of the |
| public ImageInputStream | Returns: anImageInputStream instance.an object of the class type returned by
input)getInputClass.Returns an instance of the |
| public Class | Returns: aClass variable.Returns a |
| public boolean | Returns: true if a cache file is needed by the
input streams created by this service provider.Returns |
| inputClass | back to summary |
|---|---|
| protected Class<?> inputClass A | |
| ImageInputStreamSpi | back to summary |
|---|---|
| protected ImageInputStreamSpi() Constructs a blank | |
| ImageInputStreamSpi | back to summary |
|---|---|
| public ImageInputStreamSpi(String vendorName, String version, Class<?> inputClass) Constructs an
| |
| canUseCacheFile | back to summary |
|---|---|
| public boolean canUseCacheFile() Returns The default implementation returns
| |
| createInputStreamInstance | back to summary |
|---|---|
| public abstract ImageInputStream createInputStreamInstance(Object input, boolean useCache, File cacheDir) throws IOException Returns an instance of the
| |
| createInputStreamInstance | back to summary |
|---|---|
| public ImageInputStream createInputStreamInstance(Object input) throws IOException Returns an instance of the
| |
| getInputClass | back to summary |
|---|---|
| public Class Returns a Typical return values might include
| |
| needsCacheFile | back to summary |
|---|---|
| public boolean needsCacheFile() Returns The default implementation returns
| |