Class Directory

java.lang.Object
is.galia.codec.tiff.Directory

public final class Directory extends Object
Image file directory (IFD).
  • Constructor Details

    • Directory

      public Directory(TagSet tagSet)
      Parameters:
      tagSet - Tag set on which this instance will be based.
  • Method Details

    • add

      public void add(Field field)
      Parameters:
      field - Field to add.
      Throws:
      IllegalArgumentException - if the argument's tag does not exist in the instance's TagSet.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getField

      public Field getField(Tag tag)
    • getFields

      public Set<Field> getFields()
      Returns:
      Immutable instance, sorted by tag number.
    • getSubdirectory

      public Directory getSubdirectory(Tag ifdPointerTag)
    • getTagSet

      public TagSet getTagSet()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • size

      public int size()
      Returns:
      Number of fields in the instance, including sub-IFD pointer fields but excluding sub-IFD fields.
    • toMap

      public Map<String,Object> toMap()

      Returns a map with the following structure:

      { "tagSet": String, "fields": { "Field1Name": [ Object ], "Field2Name": [ Object, Object ], "SubIFDPointerName": { "tagSet": String, "Fields": { "Field1Name": [ Object, Object ] "Field2Name": [ Object ] } } } }
      Returns:
      Map representation of the instance.