/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Class which adds utility DOM element attribute access methods to
* <code>IIOMetadata</code> for subclass use.
*/
/**
* Represents an undefined value of integer attributes.
*/
//
// Note: These attribute methods were shamelessly lifted from
// com.sun.imageio.plugins.png.PNGMetadata and modified.
//
// Shorthand for throwing an IIOInvalidTreeException
throws IIOInvalidTreeException {
}
// Get an integer-valued attribute
boolean required,
throws IIOInvalidTreeException {
if (!required) {
return defaultValue;
} else {
}
}
}
boolean validValue = false;
for (int i = 0; i < len; i++) {
validValue = true;
break;
}
}
if (!validValue) {
}
}
return value;
}
// Get an integer-valued attribute
int defaultValue, boolean required,
throws IIOInvalidTreeException {
return defaultValue;
}
int intValue = defaultValue;
try {
} catch (NumberFormatException e) {
}
}
return intValue;
}
// Get a float-valued attribute
float defaultValue,
boolean required)
throws IIOInvalidTreeException {
return defaultValue;
}
}
// Get a required integer-valued attribute
throws IIOInvalidTreeException {
}
// Get a required float-valued attribute
throws IIOInvalidTreeException {
}
// Get a boolean-valued attribute
boolean defaultValue,
boolean required)
throws IIOInvalidTreeException {
if (!required) {
return defaultValue;
} else {
}
}
// Allow lower case booleans for backward compatibility, #5082756
return true;
return false;
} else {
return false;
}
}
// Get a required boolean-valued attribute
throws IIOInvalidTreeException {
}
// Get an enumerated attribute as an index into a String array
String[] legalNames,
int defaultValue,
boolean required)
throws IIOInvalidTreeException {
if (!required) {
return defaultValue;
} else {
}
}
return i;
}
}
return -1;
}
// Get a required enumerated attribute as an index into a String array
String[] legalNames)
throws IIOInvalidTreeException {
}
// Get a String-valued attribute
throws IIOInvalidTreeException {
if (!required) {
return defaultValue;
} else {
}
}
return attr.getNodeValue();
}
// Get a required String-valued attribute
throws IIOInvalidTreeException {
}
}
throws IIOInvalidTreeException {
throw new IllegalArgumentException("root == null!");
}
} else if (formatName.equals
throw new IllegalArgumentException("root == null!");
}
} else {
throw new IllegalArgumentException("Not a recognized format!");
}
}
boolean lengthExpected,
int expectedLength)
throws IIOInvalidTreeException {
byte[] red = new byte[256];
byte[] green = new byte[256];
byte[] blue = new byte[256];
int maxIndex = -1;
}
}
}
}
}
colorTable[j++] = red[i];
colorTable[j++] = green[i];
colorTable[j++] = blue[i];
}
return colorTable;
}
throws IIOInvalidTreeException;
throws IIOInvalidTreeException;
}