ImageReaderWriterSpipublic abstract class ImageReaderWriterSpi extends IIOServiceProvider implements RegisterableServiceThe ImageReaderWriterSpi class is a superclass for the ImageReaderSpi and
ImageWriterSpi SPIs. |
Fields Summary |
---|
protected String[] | namesThe names. | protected String[] | suffixesThe suffixes. | protected String[] | MIMETypesThe MIME types. | protected String | pluginClassNameThe plug-in class name. | protected boolean | supportsStandardStreamMetadataFormatWhether the reader/writer supports standard stream metadata format. | protected String | nativeStreamMetadataFormatNameThe native stream metadata format name. | protected String | nativeStreamMetadataFormatClassNameThe native stream metadata format class name. | protected String[] | extraStreamMetadataFormatNamesThe extra stream metadata format names. | protected String[] | extraStreamMetadataFormatClassNamesThe extra stream metadata format class names. | protected boolean | supportsStandardImageMetadataFormatWhether the reader/writer supports standard image metadata format. | protected String | nativeImageMetadataFormatNameThe native image metadata format name. | protected String | nativeImageMetadataFormatClassNameThe native image metadata format class name. | protected String[] | extraImageMetadataFormatNamesThe extra image metadata format names. | protected String[] | extraImageMetadataFormatClassNamesThe extra image metadata format class names. |
Constructors Summary |
---|
public ImageReaderWriterSpi(String vendorName, String version, String[] names, String[] suffixes, String[] MIMETypes, String pluginClassName, boolean supportsStandardStreamMetadataFormat, String nativeStreamMetadataFormatName, String nativeStreamMetadataFormatClassName, String[] extraStreamMetadataFormatNames, String[] extraStreamMetadataFormatClassNames, boolean supportsStandardImageMetadataFormat, String nativeImageMetadataFormatName, String nativeImageMetadataFormatClassName, String[] extraImageMetadataFormatNames, String[] extraImageMetadataFormatClassNames)Instantiates a new ImageReaderWriterSpi.
super(vendorName, version);
if (names == null || names.length == 0) {
throw new NullPointerException("format names array cannot be NULL or empty");
}
if (pluginClassName == null) {
throw new NullPointerException("Plugin class name cannot be NULL");
}
// We clone all the arrays to be consistent with the fact that
// some methods of this class must return clones of the arrays
// as it is stated in the spec.
this.names = names.clone();
this.suffixes = suffixes == null ? null : suffixes.clone();
this.MIMETypes = MIMETypes == null ? null : MIMETypes.clone();
this.pluginClassName = pluginClassName;
this.supportsStandardStreamMetadataFormat = supportsStandardStreamMetadataFormat;
this.nativeStreamMetadataFormatName = nativeStreamMetadataFormatName;
this.nativeStreamMetadataFormatClassName = nativeStreamMetadataFormatClassName;
this.extraStreamMetadataFormatNames = extraStreamMetadataFormatNames == null ? null
: extraStreamMetadataFormatNames.clone();
this.extraStreamMetadataFormatClassNames = extraStreamMetadataFormatClassNames == null ? null
: extraStreamMetadataFormatClassNames.clone();
this.supportsStandardImageMetadataFormat = supportsStandardImageMetadataFormat;
this.nativeImageMetadataFormatName = nativeImageMetadataFormatName;
this.nativeImageMetadataFormatClassName = nativeImageMetadataFormatClassName;
this.extraImageMetadataFormatNames = extraImageMetadataFormatNames == null ? null
: extraImageMetadataFormatNames.clone();
this.extraImageMetadataFormatClassNames = extraImageMetadataFormatClassNames == null ? null
: extraImageMetadataFormatClassNames.clone();
| public ImageReaderWriterSpi()Instantiates a new ImageReaderWriterSpi.
|
Methods Summary |
---|
public java.lang.String[] | getExtraImageMetadataFormatNames()Gets an array of strings with the names of additional formats of the
image metadata objects produced or consumed by this plug-in.
return extraImageMetadataFormatNames == null ? null : extraImageMetadataFormatNames.clone();
| public java.lang.String[] | getExtraStreamMetadataFormatNames()Gets an array of strings with the names of additional formats of the
stream metadata objects produced or consumed by this plug-in.
return extraStreamMetadataFormatNames == null ? null : extraStreamMetadataFormatNames
.clone();
| public java.lang.String[] | getFileSuffixes()Gets an array of strings representing file suffixes associated with the
formats that can be used by the ImageReader or ImageWriter implementation
of this service provider.
return suffixes == null ? null : suffixes.clone();
| public java.lang.String[] | getFormatNames()Gets an array of strings representing names of the formats that can be
used by the ImageReader or ImageWriter implementation associated with
this service provider.
return names.clone();
| public javax.imageio.metadata.IIOMetadataFormat | getImageMetadataFormat(java.lang.String formatName)Gets an IIOMetadataFormat object for the specified image metadata format
name.
return IIOMetadataUtils.instantiateMetadataFormat(formatName,
supportsStandardImageMetadataFormat, nativeImageMetadataFormatName,
nativeImageMetadataFormatClassName, extraImageMetadataFormatNames,
extraImageMetadataFormatClassNames);
| public java.lang.String[] | getMIMETypes()Gets an array of strings representing the MIME types of the formats that
are supported by the ImageReader or ImageWriter implementation of this
service provider.
return MIMETypes == null ? null : MIMETypes.clone();
| public java.lang.String | getNativeImageMetadataFormatName()Gets the name of the native image metadata format for this reader/writer,
which allows for lossless encoding or decoding of the image metadata with
the format.
return nativeImageMetadataFormatName;
| public java.lang.String | getNativeStreamMetadataFormatName()Gets the name of the native stream metadata format for this
reader/writer, which allows for lossless encoding or decoding of the
stream metadata with the format.
return nativeStreamMetadataFormatName;
| public java.lang.String | getPluginClassName()Gets the class name of the ImageReader or ImageWriter associated with
this service provider.
return pluginClassName;
| public javax.imageio.metadata.IIOMetadataFormat | getStreamMetadataFormat(java.lang.String formatName)Gets an IIOMetadataFormat object for the specified stream metadata format
name.
return IIOMetadataUtils.instantiateMetadataFormat(formatName,
supportsStandardStreamMetadataFormat, nativeStreamMetadataFormatName,
nativeStreamMetadataFormatClassName, extraStreamMetadataFormatNames,
extraStreamMetadataFormatClassNames);
| public boolean | isStandardImageMetadataFormatSupported()Checks if the standard metadata format is supported by the getAsTree and
setFromTree methods for the image metadata objects produced or consumed
by this reader or writer.
return supportsStandardImageMetadataFormat;
| public boolean | isStandardStreamMetadataFormatSupported()Checks if the standard metadata format is supported by the getAsTree and
setFromTree methods for the stream metadata objects produced or consumed
by this reader or writer.
return supportsStandardStreamMetadataFormat;
|
|