ImageOutputStreams. 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 ImageOutputStream. For example, a
particular ImageOutputStreamSpi might allow a generic
OutputStream to be used as a destination; another
might output to a File or to a device such as a serial
port.
By treating the creation of ImageOutputStreams as
a pluggable service, it becomes possible to handle future output
destinations without changing the API. Also, high-performance
implementations of ImageOutputStream (for example,
native implementations for a particular platform) can be installed
and used transparently by applications.
IIORegistry, javax.imageio.stream.ImageOutputStream
| Modifier and Type | Field and Description |
|---|---|
| protected Class | outputClass
A |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | ImageOutputStreamSpi(String
the vendor name. vendorName, String a version identifier. version, Class<?> a outputClass)Class object indicating the
legal object type for use by the
createOutputStreamInstance method.Constructs an |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if a cache file can be used by the
output streams created by this service provider.Returns |
| public abstract ImageOutputStream | Returns: anImageOutputStream instance.an object of the class type returned by
output, boolean getOutputClass.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 ImageOutputStream | Returns: anImageOutputStream instance.an object of the class type returned by
output)getOutputClass.Returns an instance of the |
| public Class | Returns: aClass variable.Returns a |
| public boolean | Returns: true if a cache file is needed by the
output streams created by this service provider.Returns |
| outputClass | back to summary |
|---|---|
| protected Class<?> outputClass A | |
| ImageOutputStreamSpi | back to summary |
|---|---|
| protected ImageOutputStreamSpi() Constructs a blank | |
| ImageOutputStreamSpi | back to summary |
|---|---|
| public ImageOutputStreamSpi(String vendorName, String version, Class<?> outputClass) Constructs an
| |
| canUseCacheFile | back to summary |
|---|---|
| public boolean canUseCacheFile() Returns The default implementation returns
| |
| createOutputStreamInstance | back to summary |
|---|---|
| public abstract ImageOutputStream createOutputStreamInstance(Object output, boolean useCache, File cacheDir) throws IOException Returns an instance of the
| |
| createOutputStreamInstance | back to summary |
|---|---|
| public ImageOutputStream createOutputStreamInstance(Object output) throws IOException Returns an instance of the
| |
| getOutputClass | back to summary |
|---|---|
| public Class Returns a Typical return values might include
| |
| needsCacheFile | back to summary |
|---|---|
| public boolean needsCacheFile() Returns The default implementation returns
| |