15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package com.sun.imageio.plugins.gif;
27
28 import javax.imageio.metadata.IIOInvalidTreeException;
29 import javax.imageio.metadata.IIOMetadata;
30 import javax.imageio.metadata.IIOMetadataFormatImpl;
31 import org.w3c.dom.Node;
32
33 /**
34 * Class which adds utility DOM element attribute access methods to
35 * <code>IIOMetadata</code> for subclass use.
36 */
37 abstract class GIFMetadata extends IIOMetadata {
38
39 /**
40 * Represents an undefined value of integer attributes.
41 */
42 static final int UNDEFINED_INTEGER_VALUE = -1;
43
44 //
45 // Note: These attribute methods were shamelessly lifted from
46 // com.sun.imageio.plugins.png.PNGMetadata and modified.
47 //
48
49 // Shorthand for throwing an IIOInvalidTreeException
50 protected static void fatal(Node node, String reason)
51 throws IIOInvalidTreeException {
52 throw new IIOInvalidTreeException(reason, node);
53 }
54
55 // Get an integer-valued attribute
|
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package com.sun.imageio.plugins.gif;
27
28 import javax.imageio.metadata.IIOInvalidTreeException;
29 import javax.imageio.metadata.IIOMetadata;
30 import javax.imageio.metadata.IIOMetadataFormatImpl;
31 import org.w3c.dom.Node;
32
33 /**
34 * Class which adds utility DOM element attribute access methods to
35 * {@code IIOMetadata} for subclass use.
36 */
37 abstract class GIFMetadata extends IIOMetadata {
38
39 /**
40 * Represents an undefined value of integer attributes.
41 */
42 static final int UNDEFINED_INTEGER_VALUE = -1;
43
44 //
45 // Note: These attribute methods were shamelessly lifted from
46 // com.sun.imageio.plugins.png.PNGMetadata and modified.
47 //
48
49 // Shorthand for throwing an IIOInvalidTreeException
50 protected static void fatal(Node node, String reason)
51 throws IIOInvalidTreeException {
52 throw new IIOInvalidTreeException(reason, node);
53 }
54
55 // Get an integer-valued attribute
|