java.lang.Objectjavax.imageio.spi.IIOServiceProvider
javax.imageio.spi.ImageReaderWriterSpi
javax.imageio.spi.ImageWriterSpi
All Implemented Interfaces:
RegisterableService
ImageWriter
s.
For more information on service provider classes, see the class comment
for the IIORegistry
class.
Each ImageWriterSpi
provides several types of information
about the ImageWriter
class with which it is associated.
The name of the vendor who defined the SPI class and a
brief description of the class are available via the
getVendorName
, getDescription
,
and getVersion
methods.
These methods may be internationalized to provide locale-specific
output. These methods are intended mainly to provide short,
human-writable information that might be used to organize a pop-up
menu or other list.
Lists of format names, file suffixes, and MIME types associated
with the service may be obtained by means of the
getFormatNames
, getFileSuffixes
, and
getMIMEType
methods. These methods may be used to
identify candidate ImageWriter
s for writing a
particular file or stream based on manual format selection, file
naming, or MIME associations.
A more reliable way to determine which ImageWriter
s
are likely to be able to parse a particular data stream is provided
by the canEncodeImage
method. This methods allows the
service provider to inspect the actual image contents.
Finally, an instance of the ImageWriter
class
associated with this service provider may be obtained by calling
the createWriterInstance
method. Any heavyweight
initialization, such as the loading of native libraries or creation
of large tables, should be deferred at least until the first
invocation of this method.
Field Summary | ||
---|---|---|
public static final Class[] | STANDARD_OUTPUT_TYPE | A single-element array, initially containing
ImageOutputStream.class , to be returned from
getOutputTypes . |
protected Class[] | outputTypes | An array of Class objects to be returned from
getOutputTypes , initially null . |
protected String[] | readerSpiNames | An array of strings to be returned from
getImageReaderSpiNames , initially
null . |
Fields inherited from javax.imageio.spi.IIOServiceProvider: |
---|
vendorName, version |
Constructor: |
---|
ImageWriterSpi . It is up to
the subclass to initialize instance variables and/or override
method implementations in order to provide working versions of
all methods. |
ImageWriterSpi with a given
set of values.
|
Method from javax.imageio.spi.ImageWriterSpi Summary: |
---|
canEncodeImage, canEncodeImage, createWriterInstance, createWriterInstance, getImageReaderSpiNames, getOutputTypes, isFormatLossless, isOwnWriter |
Methods from javax.imageio.spi.IIOServiceProvider: |
---|
getDescription, getVendorName, getVersion, onDeregistration, onRegistration |
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from javax.imageio.spi.ImageWriterSpi Detail: |
---|
true if the ImageWriter
implementation associated with this service provider is able to
encode an image with the given layout. The layout
(i.e., the image's SampleModel and
ColorModel ) is described by an
ImageTypeSpecifier object.
A return value of Different |
true if the ImageWriter
implementation associated with this service provider is able to
encode the given RenderedImage instance. Note
that this includes instances of
java.awt.image.BufferedImage .
See the discussion for
|
ImageWriter
implementation associated with this service provider.
The returned object will initially be in an initial state as if
its reset method had been called.
The default implementation simply returns
|
ImageWriter
implementation associated with this service provider.
The returned object will initially be in an initial state
as if its reset method had been called.
An Typically, a plug-in will implement this method using code
such as |
String s containing all the
fully qualified names of all the ImageReaderSpi
classes that can understand the internal metadata
representation used by the ImageWriter associated
with this service provider, or null if there are
no such ImageReaders specified. If a
non-null value is returned, it must have non-zero
length.
The first item in the array must be the name of the service
provider for the "preferred" reader, as it will be used to
instantiate the This mechanism may be used to obtain
|
Class objects indicating what
types of objects may be used as arguments to the writer's
setOutput method.
For most writers, which only output to an
|
true if the format that this writer
outputs preserves pixel data bit-accurately. The default
implementation returns true . |
true if the ImageWriter object
passed in is an instance of the ImageWriter
associated with this service provider. |