src/share/classes/javax/imageio/spi/ImageReaderWriterSpi.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 237,254 **** } if (pluginClassName == null) { throw new IllegalArgumentException("pluginClassName == null!"); } ! this.names = (String[])names.clone(); // If length == 0, leave it null if (suffixes != null && suffixes.length > 0) { ! this.suffixes = (String[])suffixes.clone(); } // If length == 0, leave it null if (MIMETypes != null && MIMETypes.length > 0) { ! this.MIMETypes = (String[])MIMETypes.clone(); } this.pluginClassName = pluginClassName; this.supportsStandardStreamMetadataFormat = supportsStandardStreamMetadataFormat; --- 237,254 ---- } if (pluginClassName == null) { throw new IllegalArgumentException("pluginClassName == null!"); } ! this.names = names.clone(); // If length == 0, leave it null if (suffixes != null && suffixes.length > 0) { ! this.suffixes = suffixes.clone(); } // If length == 0, leave it null if (MIMETypes != null && MIMETypes.length > 0) { ! this.MIMETypes = MIMETypes.clone(); } this.pluginClassName = pluginClassName; this.supportsStandardStreamMetadataFormat = supportsStandardStreamMetadataFormat;
*** 257,290 **** nativeStreamMetadataFormatClassName; // If length == 0, leave it null if (extraStreamMetadataFormatNames != null && extraStreamMetadataFormatNames.length > 0) { this.extraStreamMetadataFormatNames = ! (String[])extraStreamMetadataFormatNames.clone(); } // If length == 0, leave it null if (extraStreamMetadataFormatClassNames != null && extraStreamMetadataFormatClassNames.length > 0) { this.extraStreamMetadataFormatClassNames = ! (String[])extraStreamMetadataFormatClassNames.clone(); } this.supportsStandardImageMetadataFormat = supportsStandardImageMetadataFormat; this.nativeImageMetadataFormatName = nativeImageMetadataFormatName; this.nativeImageMetadataFormatClassName = nativeImageMetadataFormatClassName; // If length == 0, leave it null if (extraImageMetadataFormatNames != null && extraImageMetadataFormatNames.length > 0) { this.extraImageMetadataFormatNames = ! (String[])extraImageMetadataFormatNames.clone(); } // If length == 0, leave it null if (extraImageMetadataFormatClassNames != null && extraImageMetadataFormatClassNames.length > 0) { this.extraImageMetadataFormatClassNames = ! (String[])extraImageMetadataFormatClassNames.clone(); } } /** * Constructs a blank <code>ImageReaderWriterSpi</code>. It is up --- 257,290 ---- nativeStreamMetadataFormatClassName; // If length == 0, leave it null if (extraStreamMetadataFormatNames != null && extraStreamMetadataFormatNames.length > 0) { this.extraStreamMetadataFormatNames = ! extraStreamMetadataFormatNames.clone(); } // If length == 0, leave it null if (extraStreamMetadataFormatClassNames != null && extraStreamMetadataFormatClassNames.length > 0) { this.extraStreamMetadataFormatClassNames = ! extraStreamMetadataFormatClassNames.clone(); } this.supportsStandardImageMetadataFormat = supportsStandardImageMetadataFormat; this.nativeImageMetadataFormatName = nativeImageMetadataFormatName; this.nativeImageMetadataFormatClassName = nativeImageMetadataFormatClassName; // If length == 0, leave it null if (extraImageMetadataFormatNames != null && extraImageMetadataFormatNames.length > 0) { this.extraImageMetadataFormatNames = ! extraImageMetadataFormatNames.clone(); } // If length == 0, leave it null if (extraImageMetadataFormatClassNames != null && extraImageMetadataFormatClassNames.length > 0) { this.extraImageMetadataFormatClassNames = ! extraImageMetadataFormatClassNames.clone(); } } /** * Constructs a blank <code>ImageReaderWriterSpi</code>. It is up
*** 306,316 **** * @return a non-<code>null</code> array of <code>String</code>s * or length at least 1 containing informal format names * associated with this reader or writer. */ public String[] getFormatNames() { ! return (String[])names.clone(); } /** * Returns an array of <code>String</code>s containing a list of * file suffixes associated with the formats that are generally --- 306,316 ---- * @return a non-<code>null</code> array of <code>String</code>s * or length at least 1 containing informal format names * associated with this reader or writer. */ public String[] getFormatNames() { ! return names.clone(); } /** * Returns an array of <code>String</code>s containing a list of * file suffixes associated with the formats that are generally
*** 330,340 **** * @return an array of <code>String</code>s or length at least 1 * containing common file suffixes associated with this reader or * writer, or <code>null</code>. */ public String[] getFileSuffixes() { ! return suffixes == null ? null : (String[])suffixes.clone(); } /** * Returns an array of <code>String</code>s containing a list of * MIME types associated with the formats that are generally --- 330,340 ---- * @return an array of <code>String</code>s or length at least 1 * containing common file suffixes associated with this reader or * writer, or <code>null</code>. */ public String[] getFileSuffixes() { ! return suffixes == null ? null : suffixes.clone(); } /** * Returns an array of <code>String</code>s containing a list of * MIME types associated with the formats that are generally
*** 365,375 **** * @return an array of <code>String</code>s or length at least 1 * containing MIME types associated with this reader or writer, or * <code>null</code>. */ public String[] getMIMETypes() { ! return MIMETypes == null ? null : (String[])MIMETypes.clone(); } /** * Returns the fully-qualified class name of the * <code>ImageReader</code> or <code>ImageWriter</code> plug-in --- 365,375 ---- * @return an array of <code>String</code>s or length at least 1 * containing MIME types associated with this reader or writer, or * <code>null</code>. */ public String[] getMIMETypes() { ! return MIMETypes == null ? null : MIMETypes.clone(); } /** * Returns the fully-qualified class name of the * <code>ImageReader</code> or <code>ImageWriter</code> plug-in
*** 441,451 **** * @see #getExtraImageMetadataFormatNames * @see #getNativeStreamMetadataFormatName */ public String[] getExtraStreamMetadataFormatNames() { return extraStreamMetadataFormatNames == null ? ! null : (String[])extraStreamMetadataFormatNames.clone(); } /** * Returns <code>true</code> if the standard metadata format is * among the document formats recognized by the --- 441,451 ---- * @see #getExtraImageMetadataFormatNames * @see #getNativeStreamMetadataFormatName */ public String[] getExtraStreamMetadataFormatNames() { return extraStreamMetadataFormatNames == null ? ! null : extraStreamMetadataFormatNames.clone(); } /** * Returns <code>true</code> if the standard metadata format is * among the document formats recognized by the
*** 505,515 **** * @see #getExtraStreamMetadataFormatNames * @see #getNativeImageMetadataFormatName */ public String[] getExtraImageMetadataFormatNames() { return extraImageMetadataFormatNames == null ? ! null : (String[])extraImageMetadataFormatNames.clone(); } /** * Returns an <code>IIOMetadataFormat</code> object describing the * given stream metadata format, or <code>null</code> if no --- 505,515 ---- * @see #getExtraStreamMetadataFormatNames * @see #getNativeImageMetadataFormatName */ public String[] getExtraImageMetadataFormatNames() { return extraImageMetadataFormatNames == null ? ! null : extraImageMetadataFormatNames.clone(); } /** * Returns an <code>IIOMetadataFormat</code> object describing the * given stream metadata format, or <code>null</code> if no