ucar.jpeg.icc.tags
Class ICCTagTable

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable
          extended by ucar.jpeg.icc.tags.ICCTagTable
All Implemented Interfaces:
Serializable, Cloneable, Map

public class ICCTagTable
extends Hashtable

This class models an ICCTagTable as a HashTable which maps ICCTag signatures (as Integers) to ICCTags. On disk the tag table exists as a byte array conventionally aggragted into a structured sequence of types (bytes, shorts, ints, and floats. The first four bytes are the integer count of tags in the table. This is followed by an array of triplets, one for each tag. The triplets each contain three integers, which are the tag signature, the offset of the tag in the byte array and the length of the tag in bytes. The tag data follows. Each tag consists of an integer (4 bytes) tag type, a reserved integer and the tag data, which varies depending on the tag.

Version:
1.0
Author:
Bruce A. Kern
See Also:
jj2000.j2k.icc.tags.ICCTag, Serialized Form

Constructor Summary
protected ICCTagTable(byte[] data)
          Ctor used by factory method.
 
Method Summary
static ICCTagTable createInstance(byte[] data)
          Factory method for creating a tag table from raw input.
 String toString()
          Representation of a tag table
 void write(RandomAccessFile raf)
          Output the table to a disk
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ICCTagTable

protected ICCTagTable(byte[] data)
Ctor used by factory method.

Parameters:
byte - raw tag data
Method Detail

toString

public String toString()
Representation of a tag table

Overrides:
toString in class Hashtable
Returns:
String

createInstance

public static ICCTagTable createInstance(byte[] data)
Factory method for creating a tag table from raw input.

Parameters:
byte - array of unstructured data representing a tag
Returns:
ICCTagTable

write

public void write(RandomAccessFile raf)
           throws IOException
Output the table to a disk

Parameters:
raf - RandomAccessFile which receives the table.
Throws:
IOException


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