Class IFD

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

public class IFD extends Object
Represents a TIFF Image File Directory (IFD).

An IFD consists of a 2-byte count of the number of directory entries (i.e., the number of fields), followed by a sequence of 12-byte field entries, followed by a 4-byte offset of the next IFD (or 0 if none).

There must be at least 1 IFD in a TIFF file and each IFD must have at least one entry.

Author:
Werner Randelshofer
  • Constructor Details

    • IFD

      public IFD(long offset, boolean hasNextOffset)
  • Method Details

    • getOffset

      public long getOffset()
      Returns the offset of the IFD.
    • getNextOffset

      public long getNextOffset()
      Gets the offset of the next IFD. Returns 0 if there is no next IFD.
    • hasNextOffset

      public boolean hasNextOffset()
    • getCount

      public int getCount()
      Returns the number of entries in the IFD.
    • get

      public IFDEntry get(int index)
      Returns the IFDEntry at the specified index.
    • getEntries

      public List<IFDEntry> getEntries()
      Returns an unmodifiale list of the IFDEntrys.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getLength

      public long getLength()
      Returns the length of this IFD in bytes.