Class TiffField
java.lang.Object
org.apache.commons.imaging.formats.tiff.TiffField
A TIFF field in a TIFF directory. Immutable.
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructorsConstructorDescriptionTiffField(int tag, int directoryType, AbstractFieldType abstractFieldType, long count, long offset, byte[] value, ByteOrder byteOrder, int sortHint) 
- 
Method SummaryModifier and TypeMethodDescriptionvoiddump()voiddump(PrintWriter pw) voiddump(PrintWriter pw, String prefix) byte[]Returns a copy of the raw value of the field.Returns the field's byte order.intThe length of the field's value.longgetCount()Returns the field's count, derived from bytes 4-7.intdouble[]doubleReturns the field's type, derived from bytes 2-3.int[]intintlong[]Gets the value of the field in the form of an array of eight-byte (long) integers.longGets the value of the field in the form of an eight-byte (long) integer.intReturns the TIFF field's offset/value field, derived from bytes 8-11.intintgetTag()Returns the field's tag, derived from bytes 0-1.getValue()booleanIndicates whether the field's value is inlined into the offset field.toString()
- 
Constructor Details- 
TiffFieldpublic TiffField(int tag, int directoryType, AbstractFieldType abstractFieldType, long count, long offset, byte[] value, ByteOrder byteOrder, int sortHint) 
 
- 
- 
Method Details- 
dump
- 
dump
- 
dump
- 
getByteArrayValueReturns a copy of the raw value of the field.- Returns:
- the value of the field, in the byte order of the field.
 
- 
getByteOrderReturns the field's byte order.- Returns:
- the byte order
 
- 
getBytesLengthThe length of the field's value.- Returns:
- the length, in bytes.
 
- 
getCountReturns the field's count, derived from bytes 4-7.- Returns:
- the count
 
- 
getDescriptionWithoutValue
- 
getDirectoryType
- 
getDoubleArrayValue- Throws:
- ImagingException
 
- 
getDoubleValue- Throws:
- ImagingException
 
- 
getFieldTypeReturns the field's type, derived from bytes 2-3.- Returns:
- the field's type, as a FieldTypeobject.
 
- 
getFieldTypeName
- 
getIntArrayValue- Throws:
- ImagingException
 
- 
getIntValue- Throws:
- ImagingException
 
- 
getIntValueOrArraySum- Throws:
- ImagingException
 
- 
getLongArrayValueGets the value of the field in the form of an array of eight-byte (long) integers.- Returns:
- an valid array of size zero or larger giving signed long integer values.
- Throws:
- ImagingException- if the field instance is of an incompatible type or does not contain a valid data element.
 
- 
getLongValueGets the value of the field in the form of an eight-byte (long) integer.- Returns:
- a signed long integer value.
- Throws:
- ImagingException- if the field instance is of an incompatible type or does not contain a valid data element.
 
- 
getOffsetReturns the TIFF field's offset/value field, derived from bytes 8-11.- Returns:
- the field's offset in a longof 4 packed bytes, or its inlined value <= 4 bytes long encoded in the field's byte order.
 
- 
getOversizeValueElement
- 
getSortHint
- 
getStringValue- Throws:
- ImagingException
 
- 
getTagReturns the field's tag, derived from bytes 0-1.- Returns:
- the tag, as an intin which only the lowest 2 bytes are set
 
- 
getTagInfo
- 
getTagName
- 
getValue- Throws:
- ImagingException
 
- 
getValueDescription
- 
isLocalValueIndicates whether the field's value is inlined into the offset field.- Returns:
- true if the value is inlined
 
- 
toString
 
-