2362N/A * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * A superclass containing instance variables and methods common to 0N/A * <code>ImageReaderSpi</code> and <code>ImageWriterSpi</code>. 0N/A * @see ImageReaderSpi 0N/A * @see ImageWriterSpi 0N/A * An array of strings to be returned from 0N/A * <code>getFormatNames</code>, initially <code>null</code>. 0N/A * Constructors should set this to a non-<code>null</code> value. 0N/A * An array of strings to be returned from 0N/A * <code>getFileSuffixes</code>, initially <code>null</code>. 0N/A * An array of strings to be returned from 0N/A * <code>getMIMETypes</code>, initially <code>null</code>. 0N/A * A <code>String</code> containing the name of the associated 0N/A * plug-in class, initially <code>null</code>. 0N/A * A boolean indicating whether this plug-in supports the 0N/A * standard metadata format for stream metadata, initially 0N/A * <code>false</code>. 0N/A * A <code>String</code> containing the name of the native stream 0N/A * metadata format supported by this plug-in, initially 0N/A * <code>null</code>. 0N/A * A <code>String</code> containing the class name of the native 0N/A * stream metadata format supported by this plug-in, initially 0N/A * <code>null</code>. 0N/A * An array of <code>String</code>s containing the names of any 0N/A * additional stream metadata formats supported by this plug-in, 0N/A * initially <code>null</code>. 0N/A * An array of <code>String</code>s containing the class names of 0N/A * any additional stream metadata formats supported by this plug-in, 0N/A * initially <code>null</code>. 0N/A * A boolean indicating whether this plug-in supports the 0N/A * standard metadata format for image metadata, initially 0N/A * <code>false</code>. 0N/A * A <code>String</code> containing the name of the 0N/A * native stream metadata format supported by this plug-in, 0N/A * initially <code>null</code>. 0N/A * A <code>String</code> containing the class name of the 0N/A * native stream metadata format supported by this plug-in, 0N/A * initially <code>null</code>. 0N/A * An array of <code>String</code>s containing the names of any 0N/A * additional image metadata formats supported by this plug-in, 0N/A * initially <code>null</code>. 0N/A * An array of <code>String</code>s containing the class names of 0N/A * any additional image metadata formats supported by this 0N/A * plug-in, initially <code>null</code>. 0N/A * Constructs an <code>ImageReaderWriterSpi</code> with a given 0N/A * @param vendorName the vendor name, as a non-<code>null</code> 0N/A * <code>String</code>. 0N/A * @param version a version identifier, as a non-<code>null</code> 0N/A * <code>String</code>. 0N/A * @param names a non-<code>null</code> array of 0N/A * <code>String</code>s indicating the format names. At least one 0N/A * entry must be present. 0N/A * @param suffixes an array of <code>String</code>s indicating the 0N/A * common file suffixes. If no suffixes are defined, 0N/A * <code>null</code> should be supplied. An array of length 0 0N/A * will be normalized to <code>null</code>. 0N/A * @param MIMETypes an array of <code>String</code>s indicating 0N/A * the format's MIME types. If no MIME types are defined, 0N/A * <code>null</code> should be supplied. An array of length 0 0N/A * will be normalized to <code>null</code>. 0N/A * @param pluginClassName the fully-qualified name of the 0N/A * associated <code>ImageReader</code> or <code>ImageWriter</code> 0N/A * class, as a non-<code>null</code> <code>String</code>. 0N/A * @param supportsStandardStreamMetadataFormat a 0N/A * <code>boolean</code> that indicates whether a stream metadata 0N/A * object can use trees described by the standard metadata format. 0N/A * @param nativeStreamMetadataFormatName a 0N/A * <code>String</code>, or <code>null</code>, to be returned from 0N/A * <code>getNativeStreamMetadataFormatName</code>. 0N/A * @param nativeStreamMetadataFormatClassName a 0N/A * <code>String</code>, or <code>null</code>, to be used to instantiate 0N/A * a metadata format object to be returned from 0N/A * <code>getNativeStreamMetadataFormat</code>. 0N/A * @param extraStreamMetadataFormatNames an array of 0N/A * <code>String</code>s, or <code>null</code>, to be returned from 0N/A * <code>getExtraStreamMetadataFormatNames</code>. An array of length 0N/A * 0 is normalized to <code>null</code>. 0N/A * @param extraStreamMetadataFormatClassNames an array of 0N/A * <code>String</code>s, or <code>null</code>, to be used to instantiate 0N/A * a metadata format object to be returned from 0N/A * <code>getStreamMetadataFormat</code>. An array of length 0N/A * 0 is normalized to <code>null</code>. 0N/A * @param supportsStandardImageMetadataFormat a 0N/A * <code>boolean</code> that indicates whether an image metadata 0N/A * object can use trees described by the standard metadata format. 0N/A * @param nativeImageMetadataFormatName a 0N/A * <code>String</code>, or <code>null</code>, to be returned from 0N/A * <code>getNativeImageMetadataFormatName</code>. 0N/A * @param nativeImageMetadataFormatClassName a 0N/A * <code>String</code>, or <code>null</code>, to be used to instantiate 0N/A * a metadata format object to be returned from 0N/A * <code>getNativeImageMetadataFormat</code>. 0N/A * @param extraImageMetadataFormatNames an array of 0N/A * <code>String</code>s to be returned from 0N/A * <code>getExtraImageMetadataFormatNames</code>. An array of length 0 0N/A * is normalized to <code>null</code>. 0N/A * @param extraImageMetadataFormatClassNames an array of 0N/A * <code>String</code>s, or <code>null</code>, to be used to instantiate 0N/A * a metadata format object to be returned from 0N/A * <code>getImageMetadataFormat</code>. An array of length 0N/A * 0 is normalized to <code>null</code>. 0N/A * @exception IllegalArgumentException if <code>vendorName</code> 0N/A * is <code>null</code>. 0N/A * @exception IllegalArgumentException if <code>version</code> 0N/A * is <code>null</code>. 0N/A * @exception IllegalArgumentException if <code>names</code> 0N/A * is <code>null</code> or has length 0. 0N/A * @exception IllegalArgumentException if <code>pluginClassName</code> 0N/A * is <code>null</code>. 0N/A // If length == 0, leave it null 0N/A // If length == 0, leave it null 0N/A // If length == 0, leave it null 0N/A // If length == 0, leave it null 0N/A // If length == 0, leave it null 0N/A // If length == 0, leave it null 0N/A * Constructs a blank <code>ImageReaderWriterSpi</code>. It is up 0N/A * to the subclass to initialize instance variables and/or 0N/A * override method implementations in order to provide working 0N/A * versions of all methods. 0N/A * Returns an array of <code>String</code>s containing 0N/A * human-readable names for the formats that are generally usable 0N/A * by the <code>ImageReader</code> or <code>ImageWriter</code> 0N/A * implementation associated with this service provider. For 0N/A * example, a single <code>ImageReader</code> might be able to 0N/A * process both PBM and PNM files. 0N/A * @return a non-<code>null</code> array of <code>String</code>s 0N/A * or length at least 1 containing informal format names 0N/A * associated with this reader or writer. 0N/A * Returns an array of <code>String</code>s containing a list of 0N/A * file suffixes associated with the formats that are generally 0N/A * usable by the <code>ImageReader</code> or 0N/A * <code>ImageWriter</code> implementation associated with this 0N/A * service provider. For example, a single 0N/A * <code>ImageReader</code> might be able to process files with 0N/A * '.pbm' and '.pnm' suffixes, or both '.jpg' and '.jpeg' 0N/A * suffixes. If there are no known file suffixes, 0N/A * <code>null</code> will be returned. 0N/A * <p> Returning a particular suffix does not guarantee that files 0N/A * with that suffix can be processed; it merely indicates that it 0N/A * may be worthwhile attempting to decode or encode such files 0N/A * using this service provider. 0N/A * @return an array of <code>String</code>s or length at least 1 0N/A * containing common file suffixes associated with this reader or 0N/A * writer, or <code>null</code>. 0N/A * Returns an array of <code>String</code>s containing a list of 0N/A * MIME types associated with the formats that are generally 0N/A * usable by the <code>ImageReader</code> or 0N/A * <code>ImageWriter</code> implementation associated with this 0N/A * <p> Ideally, only a single MIME type would be required in order 0N/A * to describe a particular format. However, for several reasons 0N/A * it is necessary to associate a list of types with each service 0N/A * provider. First, many common image file formats do not have 0N/A * standard MIME types, so a list of commonly used unofficial 0N/A * official MIME types but may sometimes be referred to using 0N/A * their previous unofficial designations, such as 0N/A * <code>image/png</code>. Finally, a single service provider may 0N/A * be capable of parsing multiple distinct types from the MIME 0N/A * <p> Returning a particular MIME type does not guarantee that 0N/A * files claiming to be of that type can be processed; it merely 0N/A * indicates that it may be worthwhile attempting to decode or 0N/A * encode such files using this service provider. 0N/A * @return an array of <code>String</code>s or length at least 1 0N/A * containing MIME types associated with this reader or writer, or 0N/A * <code>null</code>. 0N/A * Returns the fully-qualified class name of the 0N/A * <code>ImageReader</code> or <code>ImageWriter</code> plug-in 0N/A * associated with this service provider. 0N/A * @return the class name, as a non-<code>null</code> 0N/A * <code>String</code>. 0N/A * Returns <code>true</code> if the standard metadata format is 0N/A * among the document formats recognized by the 0N/A * <code>getAsTree</code> and <code>setFromTree</code> methods on 0N/A * the stream metadata objects produced or consumed by this 0N/A * @return <code>true</code> if the standard format is supported 0N/A * for stream metadata. 0N/A * Returns the name of the "native" stream metadata format for 0N/A * this plug-in, which typically allows for lossless encoding and 0N/A * transmission of the stream metadata stored in the format handled by 0N/A * this plug-in. If no such format is supported, 0N/A * <code>null</code>will be returned. 0N/A * <p> The default implementation returns the 0N/A * <code>nativeStreamMetadataFormatName</code> instance variable, 0N/A * which is typically set by the constructor. 0N/A * @return the name of the native stream metadata format, or 0N/A * <code>null</code>. 0N/A * Returns an array of <code>String</code>s containing the names 0N/A * of additional document formats, other than the native and 0N/A * standard formats, recognized by the 0N/A * <code>getAsTree</code> and <code>setFromTree</code> methods on 0N/A * the stream metadata objects produced or consumed by this 0N/A * <p> If the plug-in does not handle metadata, null should be 0N/A * <p> The set of formats may differ according to the particular 0N/A * images being read or written; this method should indicate all 0N/A * the additional formats supported by the plug-in under any 0N/A * <p> The default implementation returns a clone of the 0N/A * <code>extraStreamMetadataFormatNames</code> instance variable, 0N/A * which is typically set by the constructor. 0N/A * @return an array of <code>String</code>s, or null. 0N/A * @see IIOMetadata#getMetadataFormatNames 0N/A * @see #getExtraImageMetadataFormatNames 0N/A * @see #getNativeStreamMetadataFormatName 0N/A * Returns <code>true</code> if the standard metadata format is 0N/A * among the document formats recognized by the 0N/A * <code>getAsTree</code> and <code>setFromTree</code> methods on 0N/A * the image metadata objects produced or consumed by this 0N/A * @return <code>true</code> if the standard format is supported 0N/A * for image metadata. 0N/A * Returns the name of the "native" image metadata format for 0N/A * this plug-in, which typically allows for lossless encoding and 0N/A * transmission of the image metadata stored in the format handled by 0N/A * this plug-in. If no such format is supported, 0N/A * <code>null</code>will be returned. 0N/A * <p> The default implementation returns the 0N/A * <code>nativeImageMetadataFormatName</code> instance variable, 0N/A * which is typically set by the constructor. 0N/A * @return the name of the native image metadata format, or 0N/A * <code>null</code>. 0N/A * @see #getExtraImageMetadataFormatNames 0N/A * Returns an array of <code>String</code>s containing the names 0N/A * of additional document formats, other than the native and 0N/A * standard formats, recognized by the 0N/A * <code>getAsTree</code> and <code>setFromTree</code> methods on 0N/A * the image metadata objects produced or consumed by this 0N/A * <p> If the plug-in does not handle image metadata, null should 0N/A * <p> The set of formats may differ according to the particular 0N/A * images being read or written; this method should indicate all 0N/A * the additional formats supported by the plug-in under any circumstances. 0N/A * <p> The default implementation returns a clone of the 0N/A * <code>extraImageMetadataFormatNames</code> instance variable, 0N/A * which is typically set by the constructor. 0N/A * @return an array of <code>String</code>s, or null. 0N/A * @see IIOMetadata#getMetadataFormatNames 0N/A * @see #getExtraStreamMetadataFormatNames 0N/A * @see #getNativeImageMetadataFormatName 0N/A * Returns an <code>IIOMetadataFormat</code> object describing the 0N/A * given stream metadata format, or <code>null</code> if no 0N/A * description is available. The supplied name must be the native 0N/A * stream metadata format name, the standard metadata format name, 0N/A * or one of those returned by 0N/A * <code>getExtraStreamMetadataFormatNames</code>. 0N/A * @param formatName the desired stream metadata format. 0N/A * @return an <code>IIOMetadataFormat</code> object. 0N/A * @exception IllegalArgumentException if <code>formatName</code> 0N/A * is <code>null</code> or is not a supported name. 0N/A * Returns an <code>IIOMetadataFormat</code> object describing the 0N/A * given image metadata format, or <code>null</code> if no 0N/A * description is available. The supplied name must be the native 0N/A * iamge metadata format name, the standard metadata format name, 0N/A * or one of those returned by 0N/A * <code>getExtraImageMetadataFormatNames</code>. 0N/A * @param formatName the desired image metadata format. 0N/A * @return an <code>IIOMetadataFormat</code> object. 0N/A * @exception IllegalArgumentException if <code>formatName</code> 0N/A * is <code>null</code> or is not a supported name. 0N/A break;
// out of for