ucar.jpeg.icc.tags
Class ICCTag

java.lang.Object
  extended by ucar.jpeg.icc.tags.ICCTag
Direct Known Subclasses:
ICCCurveType, ICCCurveTypeReverse, ICCTextDescriptionType, ICCTextType, ICCXYZType

public abstract class ICCTag
extends Object

An ICC profile contains a 128-byte header followed by a variable number of tags contained in a tag table. Each tag is a structured block of ints. The tags share a common format on disk starting with a signature, an offset to the tag data, and a length of the tag data. The tag data itself is found at the given offset in the file and consists of a tag type int, followed by a reserved int, followed by a data block, the structure of which is unique to the tag type.

This class is the abstract super class of all tags. It models that part of the structure which is common among tags of all types.

It also contains the definitions of the various tag types.

Version:
1.0
Author:
Bruce A. Kern
See Also:
jj2000.j2k.icc.tags.ICCTagTable

Field Summary
 int count
          size of the tag data in the array
 byte[] data
          Tag data
 int offset
          offset to tag data in the array
 int signature
          Tag id
 int type
          Tag type
 
Constructor Summary
protected ICCTag(int signature, byte[] data, int offset, int count)
          Ued by subclass initialization to store the state common to all tags
 
Method Summary
static ICCTag createInstance(int signature, byte[] data, int offset, int count)
          Factory method for creating a tag of a specific type.
static String signatureString(int signature)
          Create a string representation of the signature
 String toString()
           
static String typeString(int type)
          Create a string representation of the tag type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

signature

public final int signature
Tag id


type

public final int type
Tag type


data

public final byte[] data
Tag data


offset

public final int offset
offset to tag data in the array


count

public final int count
size of the tag data in the array

Constructor Detail

ICCTag

protected ICCTag(int signature,
                 byte[] data,
                 int offset,
                 int count)
Ued by subclass initialization to store the state common to all tags

Parameters:
signature - tag being created
data - byte array containg embedded tag data
offset - to tag data in the array
count - size of tag data in bytes
Method Detail

typeString

public static String typeString(int type)
Create a string representation of the tag type

Parameters:
type - input
Returns:
String representation of the type

signatureString

public static String signatureString(int signature)
Create a string representation of the signature

Parameters:
signature - input
Returns:
String representation of the signature

createInstance

public static ICCTag createInstance(int signature,
                                    byte[] data,
                                    int offset,
                                    int count)
Factory method for creating a tag of a specific type.

Parameters:
signature - tag to create
data - byte array containg embedded tag data
offset - to tag data in the array
count - size of tag data in bytes
Returns:
specified ICCTag

toString

public String toString()
Overrides:
toString in class Object


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.