ImageWriterSpipublic abstract class ImageWriterSpi extends ImageReaderWriterSpi The ImageWriterSpi abstract class is a service provider interface (SPI) for
ImageWriters. |
Fields Summary |
---|
public static final Class[] | STANDARD_OUTPUT_TYPEThe STANDARD_OUTPUT_TYPE contains ImageInputStream.class. | protected Class[] | outputTypesThe output types. | protected String[] | readerSpiNamesThe reader SPI names. |
Constructors Summary |
---|
protected ImageWriterSpi()Instantiates a new ImageWriterSpi.
throw new UnsupportedOperationException("Not supported yet");
| public ImageWriterSpi(String vendorName, String version, String[] names, String[] suffixes, String[] MIMETypes, String pluginClassName, Class[] outputTypes, String[] readerSpiNames, boolean supportsStandardStreamMetadataFormat, String nativeStreamMetadataFormatName, String nativeStreamMetadataFormatClassName, String[] extraStreamMetadataFormatNames, String[] extraStreamMetadataFormatClassNames, boolean supportsStandardImageMetadataFormat, String nativeImageMetadataFormatName, String nativeImageMetadataFormatClassName, String[] extraImageMetadataFormatNames, String[] extraImageMetadataFormatClassNames)Instantiates a new ImageWriterSpi with the specified parameters.
super(vendorName, version, names, suffixes, MIMETypes, pluginClassName,
supportsStandardStreamMetadataFormat, nativeStreamMetadataFormatName,
nativeStreamMetadataFormatClassName, extraStreamMetadataFormatNames,
extraStreamMetadataFormatClassNames, supportsStandardImageMetadataFormat,
nativeImageMetadataFormatName, nativeImageMetadataFormatClassName,
extraImageMetadataFormatNames, extraImageMetadataFormatClassNames);
if (outputTypes == null || outputTypes.length == 0) {
throw new NullPointerException("output types array cannot be NULL or empty");
}
this.outputTypes = outputTypes;
this.readerSpiNames = readerSpiNames;
|
Methods Summary |
---|
public abstract boolean | canEncodeImage(javax.imageio.ImageTypeSpecifier type)Checks whether or not the ImageWriter implementation associated with this
service provider can encode an image with the specified type.
| public boolean | canEncodeImage(java.awt.image.RenderedImage im)Checks whether or not the ImageWriter implementation associated with this
service provider can encode the specified RenderedImage.
return canEncodeImage(ImageTypeSpecifier.createFromRenderedImage(im));
| public javax.imageio.ImageWriter | createWriterInstance()Returns an instance of the ImageWriter implementation for this service
provider.
return createWriterInstance(null);
| public abstract javax.imageio.ImageWriter | createWriterInstance(java.lang.Object extension)Returns an instance of the ImageWriter implementation for this service
provider.
| public java.lang.String[] | getImageReaderSpiNames()Gets an array of strings with names of the ImageReaderSpi classes that
support the internal metadata representation used by the ImageWriter of
this service provider, or null if there are no such ImageReaders.
return readerSpiNames;
| public java.lang.Class[] | getOutputTypes()Gets an array of Class objects whose types can be used as output for this
writer.
return outputTypes;
| public boolean | isFormatLossless()Returns true if the format of the writer's output is lossless. The
default implementation returns true.
return true;
| public boolean | isOwnWriter(javax.imageio.ImageWriter writer)Checks whether or not the specified ImageWriter object is an instance of
the ImageWriter associated with this service provider or not.
throw new UnsupportedOperationException("Not supported yet");
|
|