icc.tags
Class ICCTag

java.lang.Object
  |
  +--icc.tags.ICCTag
Direct Known Subclasses:
ICCCurveType, ICCCurveTypeReverse, ICCTextDescriptionType, ICCTextType, ICCXYZType

public abstract class ICCTag
extends java.lang.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.

See Also:
jj2000.j2k.icc.tags.ICCTagTable

Field Summary
 int count
          size of the tag data in the array
 byte[] data
          Tag data
private static int kdwBkPtSignature
           
private static int kdwBTRCSignature
           
private static int kdwBXYZSignature
           
private static int kdwCprtSignature
           
private static int kdwCurveType
           
private static int kdwCurveTypeReverse
           
private static int kdwDescSignature
           
private static int kdwDmddSignature
           
private static int kdwDmndSignature
           
private static int kdwGTRCSignature
           
private static int kdwGXYZSignature
           
private static int kdwKTRCSignature
           
private static int kdwKXYZSignature
           
private static int kdwRTRCSignature
           
private static int kdwRXYZSignature
           
private static int kdwTextDescType
           
private static int kdwTextType
           
private static int kdwWtPtSignature
           
private static int kdwXYZType
           
private static int kdwXYZTypeReverse
           
 int offset
          offset to tag data in the array
private static java.lang.String sdwBkPtSignature
           
private static java.lang.String sdwBTRCSignature
           
private static java.lang.String sdwBXYZSignature
           
private static java.lang.String sdwCprtSignature
           
private static java.lang.String sdwCurveType
           
private static java.lang.String sdwCurveTypeReverse
           
private static java.lang.String sdwDescSignature
           
private static java.lang.String sdwDmddSignature
           
private static java.lang.String sdwDmndSignature
           
private static java.lang.String sdwGTRCSignature
           
private static java.lang.String sdwGXYZSignature
           
private static java.lang.String sdwKTRCSignature
           
private static java.lang.String sdwKXYZSignature
           
private static java.lang.String sdwRTRCSignature
           
private static java.lang.String sdwRXYZSignature
           
private static java.lang.String sdwTextDescType
           
private static java.lang.String sdwTextType
           
private static java.lang.String sdwWtPtSignature
           
private static java.lang.String sdwXYZType
           
private static java.lang.String sdwXYZTypeReverse
           
 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 java.lang.String signatureString(int signature)
          Create a string representation of the signature
 java.lang.String toString()
           
static java.lang.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

sdwCprtSignature

private static final java.lang.String sdwCprtSignature
See Also:
Constant Field Values

sdwDescSignature

private static final java.lang.String sdwDescSignature
See Also:
Constant Field Values

sdwWtPtSignature

private static final java.lang.String sdwWtPtSignature
See Also:
Constant Field Values

sdwBkPtSignature

private static final java.lang.String sdwBkPtSignature
See Also:
Constant Field Values

sdwRXYZSignature

private static final java.lang.String sdwRXYZSignature
See Also:
Constant Field Values

sdwGXYZSignature

private static final java.lang.String sdwGXYZSignature
See Also:
Constant Field Values

sdwBXYZSignature

private static final java.lang.String sdwBXYZSignature
See Also:
Constant Field Values

sdwKXYZSignature

private static final java.lang.String sdwKXYZSignature
See Also:
Constant Field Values

sdwRTRCSignature

private static final java.lang.String sdwRTRCSignature
See Also:
Constant Field Values

sdwGTRCSignature

private static final java.lang.String sdwGTRCSignature
See Also:
Constant Field Values

sdwBTRCSignature

private static final java.lang.String sdwBTRCSignature
See Also:
Constant Field Values

sdwKTRCSignature

private static final java.lang.String sdwKTRCSignature
See Also:
Constant Field Values

sdwDmndSignature

private static final java.lang.String sdwDmndSignature
See Also:
Constant Field Values

sdwDmddSignature

private static final java.lang.String sdwDmddSignature
See Also:
Constant Field Values

kdwCprtSignature

private static final int kdwCprtSignature

kdwDescSignature

private static final int kdwDescSignature

kdwWtPtSignature

private static final int kdwWtPtSignature

kdwBkPtSignature

private static final int kdwBkPtSignature

kdwRXYZSignature

private static final int kdwRXYZSignature

kdwGXYZSignature

private static final int kdwGXYZSignature

kdwBXYZSignature

private static final int kdwBXYZSignature

kdwKXYZSignature

private static final int kdwKXYZSignature

kdwRTRCSignature

private static final int kdwRTRCSignature

kdwGTRCSignature

private static final int kdwGTRCSignature

kdwBTRCSignature

private static final int kdwBTRCSignature

kdwKTRCSignature

private static final int kdwKTRCSignature

kdwDmndSignature

private static final int kdwDmndSignature

kdwDmddSignature

private static final int kdwDmddSignature

sdwTextDescType

private static final java.lang.String sdwTextDescType
See Also:
Constant Field Values

sdwTextType

private static final java.lang.String sdwTextType
See Also:
Constant Field Values

sdwCurveType

private static final java.lang.String sdwCurveType
See Also:
Constant Field Values

sdwCurveTypeReverse

private static final java.lang.String sdwCurveTypeReverse
See Also:
Constant Field Values

sdwXYZType

private static final java.lang.String sdwXYZType
See Also:
Constant Field Values

sdwXYZTypeReverse

private static final java.lang.String sdwXYZTypeReverse
See Also:
Constant Field Values

kdwTextDescType

private static final int kdwTextDescType

kdwTextType

private static final int kdwTextType

kdwCurveType

private static final int kdwCurveType

kdwCurveTypeReverse

private static final int kdwCurveTypeReverse

kdwXYZType

private static final int kdwXYZType

kdwXYZTypeReverse

private static final int kdwXYZTypeReverse

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 java.lang.String typeString(int type)
Create a string representation of the tag type

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

signatureString

public static java.lang.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 java.lang.String toString()
Overrides:
toString in class java.lang.Object