public class

GIFImageMetadata

extends IIOMetadata
java.lang.Object
   ↳ javax.imageio.metadata.IIOMetadata
     ↳ com.sun.imageio.plugins.gif.GIFImageMetadata

Summary

Fields
public List applicationData
public List applicationIDs
public List authenticationCodes
public int characterCellHeight
public int characterCellWidth
public List comments
public int delayTime
public int disposalMethod
public boolean hasPlainTextExtension
public int imageHeight
public int imageLeftPosition
public int imageTopPosition
public int imageWidth
public boolean interlaceFlag
public byte[] localColorTable
public boolean sortFlag
public byte[] text
public int textBackgroundColor
public int textForegroundColor
public int textGridHeight
public int textGridLeft
public int textGridTop
public int textGridWidth
public boolean transparentColorFlag
public int transparentColorIndex
public boolean userInputFlag
[Expand]
Inherited Fields
From class javax.imageio.metadata.IIOMetadata
Public Constructors
GIFImageMetadata()
Protected Constructors
GIFImageMetadata(boolean standardMetadataFormatSupported, String nativeMetadataFormatName, String nativeMetadataFormatClassName, String[] extraMetadataFormatNames, String[] extraMetadataFormatClassNames)
Public Methods
Node getAsTree(String formatName)
Returns an XML DOM Node object that represents the root of a tree of metadata contained within this object according to the conventions defined by a given metadata format.
IIOMetadataNode getStandardChromaNode()
Returns an IIOMetadataNode representing the chroma information of the standard javax_imageio_1.0 metadata format, or null if no such information is available.
IIOMetadataNode getStandardCompressionNode()
Returns an IIOMetadataNode representing the compression information of the standard javax_imageio_1.0 metadata format, or null if no such information is available.
IIOMetadataNode getStandardDataNode()
Returns an IIOMetadataNode representing the data format information of the standard javax_imageio_1.0 metadata format, or null if no such information is available.
IIOMetadataNode getStandardDimensionNode()
Returns an IIOMetadataNode representing the dimension information of the standard javax_imageio_1.0 metadata format, or null if no such information is available.
IIOMetadataNode getStandardTextNode()
Returns an IIOMetadataNode representing the textual information of the standard javax_imageio_1.0 metadata format, or null if no such information is available.
IIOMetadataNode getStandardTransparencyNode()
Returns an IIOMetadataNode representing the transparency information of the standard javax_imageio_1.0 metadata format, or null if no such information is available.
boolean isReadOnly()
Returns true if this object does not support the mergeTree, setFromTree, and reset methods.
void mergeTree(String formatName, Node root)
Alters the internal state of this IIOMetadata object from a tree of XML DOM Nodes whose syntax is defined by the given metadata format.
void reset()
Resets all the data stored in this object to default values, usually to the state this object was in immediately after construction, though the precise semantics are plug-in specific.
void setFromTree(String formatName, Node root)
Sets the internal state of this IIOMetadata object from a tree of XML DOM Nodes whose syntax is defined by the given metadata format.
Protected Methods
static void fatal(Node node, String reason)
static String getAttribute(Node node, String name, String defaultValue, boolean required)
static String getAttribute(Node node, String name)
static boolean getBooleanAttribute(Node node, String name, boolean defaultValue, boolean required)
static boolean getBooleanAttribute(Node node, String name)
byte[] getColorTable(Node colorTableNode, String entryNodeName, boolean lengthExpected, int expectedLength)
static int getEnumeratedAttribute(Node node, String name, String[] legalNames)
static int getEnumeratedAttribute(Node node, String name, String[] legalNames, int defaultValue, boolean required)
static float getFloatAttribute(Node node, String name, float defaultValue, boolean required)
static float getFloatAttribute(Node node, String name)
static int getIntAttribute(Node node, String name, int defaultValue, boolean required, boolean bounded, int min, int max)
static int getIntAttribute(Node node, String name, boolean bounded, int min, int max)
static String getStringAttribute(Node node, String name, String defaultValue, boolean required, String[] range)
void mergeNativeTree(Node root)
void mergeStandardTree(Node root)
[Expand]
Inherited Methods
From class javax.imageio.metadata.IIOMetadata
From class java.lang.Object

Fields

public List applicationData

public List applicationIDs

public List authenticationCodes

public int characterCellHeight

public int characterCellWidth

public List comments

public int delayTime

public int disposalMethod

public boolean hasPlainTextExtension

public int imageHeight

public int imageLeftPosition

public int imageTopPosition

public int imageWidth

public boolean interlaceFlag

public byte[] localColorTable

public boolean sortFlag

public byte[] text

public int textBackgroundColor

public int textForegroundColor

public int textGridHeight

public int textGridLeft

public int textGridTop

public int textGridWidth

public boolean transparentColorFlag

public int transparentColorIndex

public boolean userInputFlag

Public Constructors

public GIFImageMetadata ()

Protected Constructors

protected GIFImageMetadata (boolean standardMetadataFormatSupported, String nativeMetadataFormatName, String nativeMetadataFormatClassName, String[] extraMetadataFormatNames, String[] extraMetadataFormatClassNames)

Public Methods

public Node getAsTree (String formatName)

Returns an XML DOM Node object that represents the root of a tree of metadata contained within this object according to the conventions defined by a given metadata format.

The names of the available metadata formats may be queried using the getMetadataFormatNames method.

Parameters
formatName the desired metadata format.
Returns
  • an XML DOM Node object forming the root of a tree.

public IIOMetadataNode getStandardChromaNode ()

Returns an IIOMetadataNode representing the chroma information of the standard javax_imageio_1.0 metadata format, or null if no such information is available. This method is intended to be called by the utility routine getStandardTree.

The default implementation returns null.

Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format.

Returns
  • an IIOMetadataNode, or null.

public IIOMetadataNode getStandardCompressionNode ()

Returns an IIOMetadataNode representing the compression information of the standard javax_imageio_1.0 metadata format, or null if no such information is available. This method is intended to be called by the utility routine getStandardTree.

The default implementation returns null.

Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format.

Returns
  • an IIOMetadataNode, or null.

public IIOMetadataNode getStandardDataNode ()

Returns an IIOMetadataNode representing the data format information of the standard javax_imageio_1.0 metadata format, or null if no such information is available. This method is intended to be called by the utility routine getStandardTree.

The default implementation returns null.

Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format.

Returns
  • an IIOMetadataNode, or null.

public IIOMetadataNode getStandardDimensionNode ()

Returns an IIOMetadataNode representing the dimension information of the standard javax_imageio_1.0 metadata format, or null if no such information is available. This method is intended to be called by the utility routine getStandardTree.

The default implementation returns null.

Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format.

Returns
  • an IIOMetadataNode, or null.

public IIOMetadataNode getStandardTextNode ()

Returns an IIOMetadataNode representing the textual information of the standard javax_imageio_1.0 metadata format, or null if no such information is available. This method is intended to be called by the utility routine getStandardTree.

The default implementation returns null.

Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format.

Returns
  • an IIOMetadataNode, or null.

public IIOMetadataNode getStandardTransparencyNode ()

Returns an IIOMetadataNode representing the transparency information of the standard javax_imageio_1.0 metadata format, or null if no such information is available. This method is intended to be called by the utility routine getStandardTree.

The default implementation returns null.

Subclasses should override this method to produce an appropriate subtree if they wish to support the standard metadata format.

Returns
  • an IIOMetadataNode, or null.

public boolean isReadOnly ()

Returns true if this object does not support the mergeTree, setFromTree, and reset methods.

Returns
  • true if this IIOMetadata object cannot be modified.

public void mergeTree (String formatName, Node root)

Alters the internal state of this IIOMetadata object from a tree of XML DOM Nodes whose syntax is defined by the given metadata format. The previous state is altered only as necessary to accomodate the nodes that are present in the given tree. If the tree structure or contents are invalid, an IIOInvalidTreeException will be thrown.

As the semantics of how a tree or subtree may be merged with another tree are completely format-specific, plug-in authors may implement this method in whatever manner is most appropriate for the format, including simply replacing all existing state with the contents of the given tree.

Parameters
formatName the desired metadata format.
root an XML DOM Node object forming the root of a tree.

public void reset ()

Resets all the data stored in this object to default values, usually to the state this object was in immediately after construction, though the precise semantics are plug-in specific. Note that there are many possible default values, depending on how the object was created.

public void setFromTree (String formatName, Node root)

Sets the internal state of this IIOMetadata object from a tree of XML DOM Nodes whose syntax is defined by the given metadata format. The previous state is discarded. If the tree's structure or contents are invalid, an IIOInvalidTreeException will be thrown.

The default implementation calls reset followed by mergeTree(formatName, root).

Parameters
formatName the desired metadata format.
root an XML DOM Node object forming the root of a tree.

Protected Methods

protected static void fatal (Node node, String reason)

protected static String getAttribute (Node node, String name, String defaultValue, boolean required)

protected static String getAttribute (Node node, String name)

protected static boolean getBooleanAttribute (Node node, String name, boolean defaultValue, boolean required)

protected static boolean getBooleanAttribute (Node node, String name)

protected byte[] getColorTable (Node colorTableNode, String entryNodeName, boolean lengthExpected, int expectedLength)

protected static int getEnumeratedAttribute (Node node, String name, String[] legalNames)

protected static int getEnumeratedAttribute (Node node, String name, String[] legalNames, int defaultValue, boolean required)

protected static float getFloatAttribute (Node node, String name, float defaultValue, boolean required)

protected static float getFloatAttribute (Node node, String name)

protected static int getIntAttribute (Node node, String name, int defaultValue, boolean required, boolean bounded, int min, int max)

protected static int getIntAttribute (Node node, String name, boolean bounded, int min, int max)

protected static String getStringAttribute (Node node, String name, String defaultValue, boolean required, String[] range)

protected void mergeNativeTree (Node root)

protected void mergeStandardTree (Node root)