public abstract class ImageOutputStreamSpi extends IIOServiceProvider
Modifier and Type | Field and Description |
---|---|
protected Class<?> |
outputClass
Indicates which kind of output is produced by the streams
created by
createOutputStreamInstance(Object) . |
vendorName, version
Modifier | Constructor and Description |
---|---|
protected |
ImageOutputStreamSpi()
Constructs a service provider for image output streams, given no
parameters.
|
|
ImageOutputStreamSpi(String vendorName,
String version,
Class<?> outputClass)
Constructs a service provider for image output streams, given the
vendor name, a version string and the kind of producable output.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canUseCacheFile()
Determines whether
ImageOutputStreams created
by this service provider benefit from using a cache file. |
ImageOutputStream |
createOutputStreamInstance(Object output) |
abstract ImageOutputStream |
createOutputStreamInstance(Object output,
boolean useCache,
File cacheDir) |
Class<?> |
getOutputClass()
Determines which kind of output is produced by the streams
created by
createOutputStreamInstance(Object) . |
boolean |
needsCacheFile()
Determines whether
ImageOutputStreams created
by this service provider require the use of a cache file. |
getDescription, getVendorName, getVersion, onDeregistration, onRegistration
protected Class<?> outputClass
createOutputStreamInstance(Object)
.protected ImageOutputStreamSpi()
IIOServiceProvider.vendorName
,
IIOServiceProvider.version
and outputClass
to non-null values.public ImageOutputStreamSpi(String vendorName, String version, Class<?> outputClass)
IllegalArgumentException
- if vendorName
or version
is null
.public Class<?> getOutputClass()
createOutputStreamInstance(Object)
.public boolean canUseCacheFile()
ImageOutputStreams
created
by this service provider benefit from using a cache file.
The default behavior is to return false
.
true
if the created streams are faster or
need less memory when a cache file is being used;
false
if no positive effect results from the cache
file.public boolean needsCacheFile()
ImageOutputStreams
created
by this service provider require the use of a cache file.
The default behavior is to return false
.
true
if the created streams can only work
when a cache file is being used; false
if no cache
file is needed.public abstract ImageOutputStream createOutputStreamInstance(Object output, boolean useCache, File cacheDir) throws IOException
IOException
public ImageOutputStream createOutputStreamInstance(Object output) throws IOException
IOException