APIdia Launch Partner
Top Fields Constructors Methods
com.sun.imageio.plugins.tiff

public Class TIFFImageMetadata

extends IIOMetadata
Class Inheritance
Imports
java.io.IOException, java.lang.reflect.InvocationTargetException, .Method, java.util.ArrayList, .Arrays, .HashMap, .Iterator, .List, .Map, .StringTokenizer, javax.imageio.metadata.IIOMetadata, .IIOInvalidTreeException, .IIOMetadataFormatImpl, .IIOMetadataNode, javax.imageio.stream.ImageInputStream, org.w3c.dom.NamedNodeMap, .Node, .NodeList, javax.imageio.plugins.tiff.BaselineTIFFTagSet, .ExifParentTIFFTagSet, .TIFFField, .TIFFTag, .TIFFTagSet

Field Summary

Modifier and TypeField and Description
private static final String[]
public static final String
public static final String
private static final String[]
pack-priv TIFFIFD
private List<TIFFTagSet>
Inherited from javax.imageio.metadata.IIOMetadata:
controllerdefaultControllerextraMetadataFormatClassNamesextraMetadataFormatNamesnativeMetadataFormatClassNamenativeMetadataFormatNamestandardFormatSupported

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public void
addShortOrLongField(int tagNumber, long value)

private static void
fatal(Node node, String reason)

public Node
getAsTree(String formatName)

Implements abstract javax.imageio.metadata.IIOMetadata.getAsTree.

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.

private static String
getAttribute(Node node, String attrName)

private Node
getChildNode(Node node, String childName)

private Node
getIFDAsTree(TIFFIFD ifd, String parentTagName, int parentTagNumber)

private Node
public TIFFIFD
public TIFFImageMetadata
getShallowClone()

Returns a TIFFImageMetadata wherein all fields in the root IFD from the BaselineTIFFTagSet are copied by value and all other fields copied by reference.

public IIOMetadataNode
getStandardChromaNode()

Overrides javax.imageio.metadata.IIOMetadata.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.

public IIOMetadataNode
getStandardCompressionNode()

Overrides javax.imageio.metadata.IIOMetadata.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.

public IIOMetadataNode
getStandardDataNode()

Overrides javax.imageio.metadata.IIOMetadata.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.

public IIOMetadataNode
getStandardDimensionNode()

Overrides javax.imageio.metadata.IIOMetadata.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.

public IIOMetadataNode
getStandardDocumentNode()

Overrides javax.imageio.metadata.IIOMetadata.getStandardDocumentNode.

Returns an IIOMetadataNode representing the document information of the standard javax_imageio_1.0 metadata format, or null if no such information is available.

public IIOMetadataNode
getStandardTextNode()

Overrides javax.imageio.metadata.IIOMetadata.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.

public IIOMetadataNode
getStandardTransparencyNode()

Overrides javax.imageio.metadata.IIOMetadata.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.

public TIFFField
getTIFFField(int tagNumber)

public void
initializeFromStream(ImageInputStream stream, boolean ignoreMetadata, boolean readUnknownTags)

public boolean
isReadOnly()

Implements abstract javax.imageio.metadata.IIOMetadata.isReadOnly.

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

private char[]
private int[]
private void
private void
public void
mergeTree(String formatName, Node root)

Implements abstract javax.imageio.metadata.IIOMetadata.mergeTree.

Alters the internal state of this IIOMetadata object from a tree of XML DOM Nodes whose syntax is defined by the given metadata format.

public static TIFFIFD
parseIFD(Node node)

public void
removeTIFFField(int tagNumber)

private String
repeat(String s, int times)

public void
reset()

Implements abstract javax.imageio.metadata.IIOMetadata.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.

Inherited from javax.imageio.metadata.IIOMetadata:
activateControllergetControllergetDefaultControllergetExtraMetadataFormatNamesgetMetadataFormatgetMetadataFormatNamesgetNativeMetadataFormatNamegetStandardTileNodegetStandardTreehasControllerisStandardMetadataFormatSupportedsetControllersetFromTree

Field Detail

colorSpaceNamesback to summary
private static final String[] colorSpaceNames
NATIVE_METADATA_FORMAT_CLASS_NAMEback to summary
public static final String NATIVE_METADATA_FORMAT_CLASS_NAME
NATIVE_METADATA_FORMAT_NAMEback to summary
public static final String NATIVE_METADATA_FORMAT_NAME
orientationNamesback to summary
private static final String[] orientationNames
rootIFDback to summary
pack-priv TIFFIFD rootIFD
tagSetsback to summary
private List<TIFFTagSet> tagSets

Constructor Detail

TIFFImageMetadataback to summary
public TIFFImageMetadata(List<TIFFTagSet> tagSets)
TIFFImageMetadataback to summary
public TIFFImageMetadata(TIFFIFD ifd)

Method Detail

addShortOrLongFieldback to summary
public void addShortOrLongField(int tagNumber, long value)
fatalback to summary
private static void fatal(Node node, String reason) throws IIOInvalidTreeException
getAsTreeback to summary
public Node getAsTree(String formatName)

Implements abstract javax.imageio.metadata.IIOMetadata.getAsTree.

Doc from javax.imageio.metadata.IIOMetadata.getAsTree.

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.

Annotations
@Override
getAttributeback to summary
private static String getAttribute(Node node, String attrName)
getChildNodeback to summary
private Node getChildNode(Node node, String childName)
getIFDAsTreeback to summary
private Node getIFDAsTree(TIFFIFD ifd, String parentTagName, int parentTagNumber)
getNativeTreeback to summary
private Node getNativeTree()
getRootIFDback to summary
public TIFFIFD getRootIFD()
getShallowCloneback to summary
public TIFFImageMetadata getShallowClone()

Returns a TIFFImageMetadata wherein all fields in the root IFD from the BaselineTIFFTagSet are copied by value and all other fields copied by reference.

getStandardChromaNodeback to summary
public IIOMetadataNode getStandardChromaNode()

Overrides javax.imageio.metadata.IIOMetadata.getStandardChromaNode.

Doc from javax.imageio.metadata.IIOMetadata.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.

Annotations
@Override
getStandardCompressionNodeback to summary
public IIOMetadataNode getStandardCompressionNode()

Overrides javax.imageio.metadata.IIOMetadata.getStandardCompressionNode.

Doc from javax.imageio.metadata.IIOMetadata.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.

Annotations
@Override
getStandardDataNodeback to summary
public IIOMetadataNode getStandardDataNode()

Overrides javax.imageio.metadata.IIOMetadata.getStandardDataNode.

Doc from javax.imageio.metadata.IIOMetadata.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.

Annotations
@Override
getStandardDimensionNodeback to summary
public IIOMetadataNode getStandardDimensionNode()

Overrides javax.imageio.metadata.IIOMetadata.getStandardDimensionNode.

Doc from javax.imageio.metadata.IIOMetadata.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.

Annotations
@Override
getStandardDocumentNodeback to summary
public IIOMetadataNode getStandardDocumentNode()

Overrides javax.imageio.metadata.IIOMetadata.getStandardDocumentNode.

Doc from javax.imageio.metadata.IIOMetadata.getStandardDocumentNode.

Returns an IIOMetadataNode representing the document 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.

Annotations
@Override
getStandardTextNodeback to summary
public IIOMetadataNode getStandardTextNode()

Overrides javax.imageio.metadata.IIOMetadata.getStandardTextNode.

Doc from javax.imageio.metadata.IIOMetadata.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.

Annotations
@Override
getStandardTransparencyNodeback to summary
public IIOMetadataNode getStandardTransparencyNode()

Overrides javax.imageio.metadata.IIOMetadata.getStandardTransparencyNode.

Doc from javax.imageio.metadata.IIOMetadata.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.

Annotations
@Override
getTIFFFieldback to summary
public TIFFField getTIFFField(int tagNumber)
initializeFromStreamback to summary
public void initializeFromStream(ImageInputStream stream, boolean ignoreMetadata, boolean readUnknownTags) throws IOException
isReadOnlyback to summary
public boolean isReadOnly()

Implements abstract javax.imageio.metadata.IIOMetadata.isReadOnly.

Doc from javax.imageio.metadata.IIOMetadata.isReadOnly.

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

Annotations
@Override
listToCharArrayback to summary
private char[] listToCharArray(String list)
listToIntArrayback to summary
private int[] listToIntArray(String list)
mergeNativeTreeback to summary
private void mergeNativeTree(Node root) throws IIOInvalidTreeException
mergeStandardTreeback to summary
private void mergeStandardTree(Node root) throws IIOInvalidTreeException
mergeTreeback to summary
public void mergeTree(String formatName, Node root) throws IIOInvalidTreeException

Implements abstract javax.imageio.metadata.IIOMetadata.mergeTree.

Doc from javax.imageio.metadata.IIOMetadata.mergeTree.

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 accommodate 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.

Annotations
@Override
Exceptions
IIOInvalidTreeException:
if the tree cannot be parsed successfully using the rules of the given format.
parseIFDback to summary
public static TIFFIFD parseIFD(Node node) throws IIOInvalidTreeException
removeTIFFFieldback to summary
public void removeTIFFField(int tagNumber)
repeatback to summary
private String repeat(String s, int times)
resetback to summary
public void reset()

Implements abstract javax.imageio.metadata.IIOMetadata.reset.

Doc from javax.imageio.metadata.IIOMetadata.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.

Annotations
@Override