Class IFDEntry

java.lang.Object
org.monte.media.tiff.IFDEntry

public class IFDEntry extends Object
Represents a directory entry in a TIFF Image File Directory (IFD).

Each 12-byte IFD entry has the following format:

  • Bytes 0-1 The Tag that identifies the field.
  • Bytes 2-3 The field Type.
  • Bytes 4-7 The number of values, Count of the indicated Type.
  • Bytes 8-11 The Value Offset, the file offset (in bytes) of the Value for the field. The Value is expected to begin on a word boundary; the corresponding Value Offset will thus be an even number. This file offset may point anywhere in the file, even after the image data.
Author:
Werner Randelshofer
  • Constructor Details

    • IFDEntry

      public IFDEntry(int tagNumber, int typeNumber, long count, long valueOffset, long entryOffset)
  • Method Details

    • getCount

      public long getCount()
    • getTagNumber

      public int getTagNumber()
    • getTypeNumber

      public int getTypeNumber()
    • getValueOffset

      public long getValueOffset()
      The value offset may either contain the data or point to the data depending on the type and the count.
      Returns:
      The value offset.
    • getDataOffset

      public long getDataOffset()
      The offset to the data.
    • setIFDOffset

      public void setIFDOffset(long newValue)
    • getEntryOffset

      public long getEntryOffset()
    • getIFDOffset

      public long getIFDOffset()
    • isDataInValueOffset

      public boolean isDataInValueOffset()
    • getLength

      public long getLength()
    • readData

      public Object readData(TIFFInputStream in) throws IOException
      Reads value data with ifdDataOffset=0
      Throws:
      IOException
    • readData

      public Object readData(TIFFInputStream in, long ifdDataOffset) throws IOException
      Reads value data with the specified ifdDataOffset.
      Throws:
      IOException
    • loadData

      public void loadData(TIFFInputStream in) throws IOException
      Throws:
      IOException
    • getData

      public Object getData()
    • toString

      public String toString()
      FIXME Output is used by EXIFView
      Overrides:
      toString in class Object
    • toString

      public String toString(Enum<?> tagName)