Class IfdStructure
- java.lang.Object
-
- net.coobird.thumbnailator.util.exif.IfdStructure
-
public class IfdStructure extends java.lang.ObjectIFD structure as defined in Section 4.6.2 of the Exif Specification version 2.3.
-
-
Field Summary
Fields Modifier and Type Field Description private intcountprivate intoffsetValueprivate inttagprivate IfdTypetype
-
Constructor Summary
Constructors Constructor Description IfdStructure(int tag, int type, int count, int offsetValue)Instantiates a IFD with the given attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Returns whether this object is equal to the given object.intgetCount()Returns the count element in the IFD structure, indicating the number of values the value field..intgetOffsetValue()Returns either the offset or value of the IFD.intgetTag()Returns the tag element in the IFD structure.IfdTypegetType()Returns the type element in the IFD structure.inthashCode()Returns the calculated hash code for this object.booleanisOffset()Returns whether the value returned by thegetOffsetValue()method is an offset value.booleanisValue()Returns whether the value returned by thegetOffsetValue()method is an actual value.java.lang.StringtoString()Returns a textualStringreprensentation of this object.
-
-
-
Field Detail
-
tag
private final int tag
-
type
private final IfdType type
-
count
private final int count
-
offsetValue
private final int offsetValue
-
-
Method Detail
-
getTag
public int getTag()
Returns the tag element in the IFD structure.- Returns:
- An integer representation of the tag element. Should be a value between 0x00 to 0xFF.
-
getType
public IfdType getType()
Returns the type element in the IFD structure.- Returns:
- An
IfdTypeenum indicating the type.
-
getCount
public int getCount()
Returns the count element in the IFD structure, indicating the number of values the value field..- Returns:
- A count indicating the number of values.
-
getOffsetValue
public int getOffsetValue()
Returns either the offset or value of the IFD.- Returns:
- Either the offset or value. The type of the returned value
can be determined by the return of the
isOffset()orisValue()method.
-
isValue
public boolean isValue()
Returns whether the value returned by thegetOffsetValue()method is an actual value.- Returns:
trueif the value returned by thegetOffsetValue()method is a value,falseotherwise.
-
isOffset
public boolean isOffset()
Returns whether the value returned by thegetOffsetValue()method is an offset value.- Returns:
trueif the value returned by thegetOffsetValue()method is a offset value,falseotherwise.
-
hashCode
public int hashCode()
Returns the calculated hash code for this object.- Overrides:
hashCodein classjava.lang.Object- Returns:
- Hash code for this object.
-
equals
public boolean equals(java.lang.Object obj)
Returns whether this object is equal to the given object.- Overrides:
equalsin classjava.lang.Object- Returns:
trueif the given object and this object is equivalent,falseotherwise.
-
toString
public java.lang.String toString()
Returns a textualStringreprensentation of this object.- Overrides:
toStringin classjava.lang.Object- Returns:
- A textual representation of this object.
-
-