Returns an instance of the
ImageOutputStream
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.
Returns:
an
ImageOutputStream
instance.
Parameters:
-
output - an object of the class type returned by
getOutputClass
.
-
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.
Throws:
-
IllegalArgumentException - if
output
is
not an instance of the correct class or is
null
.
-
IllegalArgumentException - if a cache file is needed,
but
cacheDir
is non-
null
and is not a
directory.
-
IOException - if a cache file is needed but cannot be
created.
See Also:
ImageOutputStreamSpi.getOutputClass()
,