APIdia Launch Partner
Top Description Fields Constructors Methods
javax.imageio.plugins.tiff

public final Class TIFFField

extends Object
implements Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable
Imports
java.util.StringTokenizer, org.w3c.dom.NamedNodeMap, .Node, com.sun.imageio.plugins.tiff.TIFFFieldNode

A class representing a field in a TIFF 6.0 Image File Directory.

A field in a TIFF Image File Directory (IFD) is defined as a tag number accompanied by a sequence of values of identical data type. TIFF 6.0 defines 12 data types; a 13th type IFD is defined in TIFF Tech Note 1 of TIFF Specification Supplement 1. These TIFF data types are referred to by Java constants and mapped internally onto Java language data types and type names as follows:

TIFF Data Type to Java Data Type Mapping
TIFF Data Type Java Constant Java Data Type Java Type Name
BYTE TIFFTag#TIFF_BYTE byte "Byte"
ASCII TIFFTag#TIFF_ASCII String "Ascii"
SHORT TIFFTag#TIFF_SHORT char "Short"
LONG TIFFTag#TIFF_LONG long "Long"
RATIONAL TIFFTag#TIFF_RATIONAL long[2] {numerator, denominator} "Rational"
SBYTE TIFFTag#TIFF_SBYTE byte "SByte"
UNDEFINED TIFFTag#TIFF_UNDEFINED byte "Undefined"
SSHORT TIFFTag#TIFF_SSHORT short "SShort"
SLONG TIFFTag#TIFF_SLONG int "SLong"
SRATIONAL TIFFTag#TIFF_SRATIONAL int[2] {numerator, denominator} "SRational"
FLOAT TIFFTag#TIFF_FLOAT float "Float"
DOUBLE TIFFTag#TIFF_DOUBLE double "Double"
IFD TIFFTag#TIFF_IFD_POINTER long "IFDPointer"
Since
9
See Also
TIFFDirectory, TIFFTag

Field Summary

Modifier and TypeField and Description
private int
count

The number of data items present in the field.

private Object
data

The field data.

private TIFFDirectory
dir

The IFD contents if available.

private static final boolean[]
private static final long
private TIFFTag
tag

The tag.

private int
tagNumber

The tag number.

private int
type

The tag type.

private static final String[]

Constructor Summary

AccessConstructor and Description
private
TIFFField()

The default constructor.

public
TIFFField(TIFFTag
The tag to associated with this field.
tag
,
int
One of the TIFFTag.TIFF_* constants indicating the data type of the field as written to the TIFF stream.
type
,
int
The number of data values.
count
,
Object
The actual data content of the field.
data
)

Constructs a TIFFField with arbitrary data.

public
TIFFField(TIFFTag
The tag to associated with this field.
tag
,
int
One of the TIFFTag.TIFF_* constants indicating the data type of the field as written to the TIFF stream.
type
,
int
The number of data values.
count
)

Constructs a data array using createArrayForType() and invokes TIFFField(TIFFTag, int, int, Object) with the supplied parameters and the created array.

public
TIFFField(TIFFTag
The tag to associate with this field.
tag
,
long
The value to associate with this field.
value
)

Constructs a TIFFField with a single non-negative integral value.

public
TIFFField(TIFFTag
The tag to associated with this field.
tag
,
int
One of the constants TIFFTag.TIFF_LONG or TIFFTag.TIFF_IFD_POINTER.
type
,
long
The IFD offset.
offset
,
TIFFDirectory
The directory.
dir
)

Constructs a TIFFField with an IFD offset and contents.

Method Summary

Modifier and TypeMethod and Description
public TIFFField

Returns:

A clone of this TIFFField.
clone
()

Overrides java.lang.Object.clone.

Clones the field and all the information contained therein.

public static Object

Returns:

An array appropriate for the specified data type.
createArrayForType
(int
One of the TIFFTag.TIFF_* data type constants.
dataType
,
int
The number of values in the array.
count
)

Creates an array appropriate for the indicated data type.

public static TIFFField

Returns:

A new TIFFField.
createFromMetadataNode
(TIFFTagSet
The TIFFTagSet to which the TIFFTag of the field belongs.
tagSet
,
Node
A native TIFF image metadata TIFFField node.
node
)

Creates a TIFFField from a TIFF native image metadata node.

public byte[]

Returns:

The data as an uninterpreted array of bytes.
getAsBytes
()

Returns the data as an uninterpreted array of bytes.

public char[]

Returns:

The data as an array of chars.
getAsChars
()

Returns TIFFTag.TIFF_SHORT data as an array of chars (unsigned 16-bit integers).

public double

Returns:

The data at the given index as a double.
getAsDouble
(int
The index of the data.
index
)

Returns data in any format as a double.

public double[]

Returns:

The data as an array of doubles.
getAsDoubles
()

Returns TIFFTag.TIFF_DOUBLE data as an array of doubles (64-bit floating-point values).

public float

Returns:

The data at the given index as a float.
getAsFloat
(int
The index of the data.
index
)

Returns data in any format as a float.

public float[]

Returns:

The data as an array of floats.
getAsFloats
()

Returns TIFFTag.TIFF_FLOAT data as an array of floats (32-bit floating-point values).

public int

Returns:

The data at the given index as an int.
getAsInt
(int
The index of the data.
index
)

Returns data in any format as an int.

public int[]

Returns:

The data as an array of ints.
getAsInts
()

Returns TIFFTag.TIFF_SLONG data as an array of ints (signed 32-bit integers).

public long

Returns:

The data at the given index as a long.
getAsLong
(int
The index of the data.
index
)

Returns data in any format as a long.

public long[]

Returns:

The data as an array of longs.
getAsLongs
()

Returns TIFFTag.TIFF_LONG or TIFF_IFD_POINTER data as an array of longs (signed 64-bit integers).

public Node

Returns:

a Node named "TIFFField" or "TIFFIFD".
getAsNativeNode
()

Returns the TIFFField as a node named either "TIFFField" or "TIFFIFD" as described in the TIFF native image metadata specification.

public long[]

Returns:

The data at the given index as an unsigned rational.
getAsRational
(int
The index of the data.
index
)

Returns a TIFFTag.TIFF_RATIONAL data item as a two-element array of ints.

public long[][]

Returns:

The data as an array of unsigned rationals.
getAsRationals
()

Returns TIFFTag.TIFF_RATIONAL data as an array of 2-element arrays of longs.

public short[]

Returns:

The data as an array of shorts.
getAsShorts
()

Returns TIFFTag.TIFF_SSHORT data as an array of shorts (signed 16-bit integers).

public int[]

Returns:

The data at the given index as a signed rational.
getAsSRational
(int
The index of the data.
index
)

Returns a TIFFTag.TIFF_SRATIONAL data item as a two-element array of ints.

public int[][]

Returns:

The data as an array of signed rationals.
getAsSRationals
()

Returns TIFFTag.TIFF_SRATIONAL data as an array of 2-element arrays of ints.

public String

Returns:

The data at the given index as a String.
getAsString
(int
The index of the data.
index
)

Returns a TIFFTag.TIFF_ASCII value as a String.

private static String
getAttribute(Node node, String attrName)

public int

Returns:

The number of data items present in the field.
getCount
()

Returns the number of data items present in the field.

public Object

Returns:

The data object of the field.
getData
()

Returns a reference to the data object associated with the field.

public TIFFDirectory

Returns:

the TIFFDirectory instance or null.
getDirectory
()

Returns the associated TIFFDirectory, if available.

public TIFFTag

Returns:

The associated TIFFTag.
getTag
()

Retrieves the tag associated with this field.

public int

Returns:

The tag number.
getTagNumber
()

Retrieves the tag number in the range [0,65535].

public int

Returns:

The data type of the field value.
getType
()

Returns the type of the data stored in the field.

public static int

Returns:

One of the TIFFTag.TIFF_* constants or -1 if the name is not recognized.
getTypeByName
(String
The type name.
typeName
)

Returns the data type constant corresponding to the supplied data type name.

public static String

Returns:

The type name corresponding to the supplied type constant.
getTypeName
(int
One of the TIFFTag.TIFF_* constants indicating the data type of the field as written to the TIFF stream.
dataType
)

Returns the name of the supplied data type constant.

public String

Returns:

The data at the given index as a String.
getValueAsString
(int
The index of the data.
index
)

Returns a String containing a human-readable version of the data item.

public boolean

Returns:

true if and only if getDirectory() returns non-null.
hasDirectory
()

Returns whether the field has a TIFFDirectory.

private static void
initData(Node node, int[] otype, int[] ocount, Object[] odata)

public boolean

Returns:

Whether the field type is integral.
isIntegral
()

Indicates whether the value associated with the field is of integral data type.

Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

countback to summary
private int count

The number of data items present in the field.

databack to summary
private Object data

The field data.

dirback to summary
private TIFFDirectory dir

The IFD contents if available. This will usually be a TIFFIFD.

IS_INTEGRALback to summary
private static final boolean[] IS_INTEGRAL
MAX_UINT32back to summary
private static final long MAX_UINT32
tagback to summary
private TIFFTag tag

The tag.

tagNumberback to summary
private int tagNumber

The tag number.

typeback to summary
private int type

The tag type.

TYPE_NAMESback to summary
private static final String[] TYPE_NAMES

Constructor Detail

TIFFFieldback to summary
private TIFFField()

The default constructor.

TIFFFieldback to summary
public TIFFField(TIFFTag tag, int type, int count, Object data)

Constructs a TIFFField with arbitrary data. The type parameter must be a value for which tag.isDataTypeOK() returns true. The data parameter must be an array of a Java type appropriate for the type of the TIFF field.

Note that the value (data) of the TIFFField will always be the actual field value regardless of the number of bytes required for that value. This is the case despite the fact that the TIFF IFD Entry corresponding to the field may actually contain the offset to the value of the field rather than the value itself (the latter occurring if and only if the value fits into 4 bytes). In other words, the value of the field will already have been read from the TIFF stream. (An exception to this case may occur when the field represents the contents of a non-baseline IFD. In that case the data will be a long[] containing the offset to the IFD and the TIFFDirectory returned by getDirectory() will be its contents.)

Parameters
tag:TIFFTag

The tag to associated with this field.

type:int

One of the TIFFTag.TIFF_* constants indicating the data type of the field as written to the TIFF stream.

count:int

The number of data values.

data:Object

The actual data content of the field.

Exceptions
NullPointerException:
  • if tag == null.
  • if data == null.
IllegalArgumentException:
  • if type is not one of the TIFFTag.TIFF_* data type constants.
  • if type is an unacceptable data type for the supplied TIFFTag.
  • if count < 0.
  • if count < 1 and type is TIFF_RATIONAL or TIFF_SRATIONAL.
  • if count != 1 and type is TIFF_IFD_POINTER.
  • if data is an instance of a class incompatible with the specified type.
  • if the size of the data array is wrong.
  • if the type of the data array is TIFF_LONG, TIFF_RATIONAL, or TIFF_IFD_POINTER and any of the elements is negative or greater than 0xffffffff.
TIFFFieldback to summary
public TIFFField(TIFFTag tag, int type, int count)

Constructs a data array using createArrayForType() and invokes TIFFField(TIFFTag, int, int, Object) with the supplied parameters and the created array.

Parameters
tag:TIFFTag

The tag to associated with this field.

type:int

One of the TIFFTag.TIFF_* constants indicating the data type of the field as written to the TIFF stream.

count:int

The number of data values.

Exceptions
NullPointerException:
if tag == null.
IllegalArgumentException:
  • if type is not one of the TIFFTag.TIFF_* data type constants.
  • if type is an unacceptable data type for the supplied TIFFTag.
  • if count < 0.
  • if count < 1 and type is TIFF_RATIONAL or TIFF_SRATIONAL.
  • if count != 1 and type is TIFF_IFD_POINTER.
See Also
TIFFField(TIFFTag, int, int, Object)
TIFFFieldback to summary
public TIFFField(TIFFTag tag, long value)

Constructs a TIFFField with a single non-negative integral value. The field will have type TIFF_SHORT if value is in [0,0xffff], and type TIFF_LONG if value is in [0x10000,0xffffffff]. The count of the field will be unity.

Parameters
tag:TIFFTag

The tag to associate with this field.

value:long

The value to associate with this field.

Exceptions
NullPointerException:
if tag == null.
IllegalArgumentException:
  • if value is not in [0,0xffffffff].
  • if value is in [0,0xffff] and TIFF_SHORT is an unacceptable type for the TIFFTag, or if value is in [0x10000,0xffffffff] and TIFF_LONG is an unacceptable type for the TIFFTag.
TIFFFieldback to summary
public TIFFField(TIFFTag tag, int type, long offset, TIFFDirectory dir)

Constructs a TIFFField with an IFD offset and contents. The offset will be stored as the data of this field as long[] {offset}. The directory will not be cloned. The count of the field will be unity.

Parameters
tag:TIFFTag

The tag to associated with this field.

type:int

One of the constants TIFFTag.TIFF_LONG or TIFFTag.TIFF_IFD_POINTER.

offset:long

The IFD offset.

dir:TIFFDirectory

The directory.

Exceptions
NullPointerException:
  • if tag == null.
  • if dir == null.
IllegalArgumentException:
  • if type is an unacceptable data type for the supplied TIFFTag.
  • if type is neither TIFFTag.TIFF_LONG nor TIFFTag.TIFF_IFD_POINTER.
  • if offset <= 0.
See Also
TIFFField(TIFFTag, int, int, Object)

Method Detail

cloneback to summary
public TIFFField clone() throws CloneNotSupportedException

Overrides java.lang.Object.clone.

Clones the field and all the information contained therein.

Returns:TIFFField

A clone of this TIFFField.

Annotations
@Override
Exceptions
CloneNotSupportedException:
if the instance cannot be cloned.
createArrayForTypeback to summary
public static Object createArrayForType(int dataType, int count)

Creates an array appropriate for the indicated data type.

Parameters
dataType:int

One of the TIFFTag.TIFF_* data type constants.

count:int

The number of values in the array.

Returns:Object

An array appropriate for the specified data type.

Exceptions
IllegalArgumentException:
  • if dataType is not one of the TIFFTag.TIFF_* data type constants.
  • if count < 0.
  • if count < 1 and type is TIFF_RATIONAL or TIFF_SRATIONAL.
  • if count != 1 and type is TIFF_IFD_POINTER.
createFromMetadataNodeback to summary
public static TIFFField createFromMetadataNode(TIFFTagSet tagSet, Node node)

Creates a TIFFField from a TIFF native image metadata node. If the value of the "number" attribute of the node is not found in tagSet then a new TIFFTag with name TIFFTag.UNKNOWN_TAG_NAME will be created and assigned to the field.

Parameters
tagSet:TIFFTagSet

The TIFFTagSet to which the TIFFTag of the field belongs.

node:Node

A native TIFF image metadata TIFFField node.

Returns:TIFFField

A new TIFFField.

Exceptions
IllegalArgumentException:
If the Node parameter content does not adhere to the TIFFField element structure defined by the TIFF native image metadata format specification, or if the combination of node attributes and data is not legal per the TIFFField(TIFFTag, int, int, Object) constructor specification. Note that a cause might be set on such an exception.
getAsBytesback to summary
public byte[] getAsBytes()

Returns the data as an uninterpreted array of bytes. The type of the field must be one of TIFFTag.TIFF_BYTE, TIFF_SBYTE, or TIFF_UNDEFINED.

For data in TIFFTag.TIFF_BYTE format, the application must take care when promoting the data to longer integral types to avoid sign extension.

Returns:byte[]

The data as an uninterpreted array of bytes.

Exceptions
ClassCastException:
if the field is not of type TIFF_BYTE, TIFF_SBYTE, or TIFF_UNDEFINED.
getAsCharsback to summary
public char[] getAsChars()

Returns TIFFTag.TIFF_SHORT data as an array of chars (unsigned 16-bit integers).

Returns:char[]

The data as an array of chars.

Exceptions
ClassCastException:
if the field is not of type TIFF_SHORT.
getAsDoubleback to summary
public double getAsDouble(int index)

Returns data in any format as a double.

TIFFTag.TIFF_BYTE and TIFF_UNDEFINED data are treated as unsigned; that is, no sign extension will take place and the returned value will be in the range [0, 255]. TIFF_SBYTE data will be returned in the range [-128, 127].

Data in TIFF_SRATIONAL or TIFF_RATIONAL format are evaluated by dividing the numerator into the denominator using double-precision arithmetic.

Data in TIFF_ASCII format will be parsed as by the Double.parseDouble method.

Parameters
index:int

The index of the data.

Returns:double

The data at the given index as a double.

getAsDoublesback to summary
public double[] getAsDoubles()

Returns TIFFTag.TIFF_DOUBLE data as an array of doubles (64-bit floating-point values).

Returns:double[]

The data as an array of doubles.

Exceptions
ClassCastException:
if the field is not of type TIFF_DOUBLE.
getAsFloatback to summary
public float getAsFloat(int index)

Returns data in any format as a float.

TIFFTag.TIFF_BYTE and TIFF_UNDEFINED data are treated as unsigned; that is, no sign extension will take place and the returned value will be in the range [0, 255]. TIFF_SBYTE data will be returned in the range [-128, 127].

Data in TIFF_SLONG, TIFF_LONG, TIFF_DOUBLE, or TIFF_IFD_POINTER format are simply cast to float and may suffer from truncation.

Data in TIFF_SRATIONAL or TIFF_RATIONAL format are evaluated by dividing the numerator into the denominator using double-precision arithmetic and then casting to float.

Data in TIFF_ASCII format will be parsed as by the Double.parseDouble method, with the result cast to float.

Parameters
index:int

The index of the data.

Returns:float

The data at the given index as a float.

getAsFloatsback to summary
public float[] getAsFloats()

Returns TIFFTag.TIFF_FLOAT data as an array of floats (32-bit floating-point values).

Returns:float[]

The data as an array of floats.

Exceptions
ClassCastException:
if the field is not of type TIFF_FLOAT.
getAsIntback to summary
public int getAsInt(int index)

Returns data in any format as an int.

TIFFTag.TIFF_BYTE values are treated as unsigned; that is, no sign extension will take place and the returned value will be in the range [0, 255]. TIFF_SBYTE data will be returned in the range [-128, 127].

A TIFF_UNDEFINED value is treated as though it were a TIFF_BYTE.

Data in TIFF_SLONG, TIFF_LONG, TIFF_FLOAT, TIFF_DOUBLE or TIFF_IFD_POINTER format are simply cast to int and may suffer from truncation.

Data in TIFF_SRATIONAL or TIFF_RATIONAL format are evaluated by dividing the numerator into the denominator using double-precision arithmetic and then casting to int. Loss of precision and truncation may occur.

Data in TIFF_ASCII format will be parsed as by the Double.parseDouble method, with the result case to int.

Parameters
index:int

The index of the data.

Returns:int

The data at the given index as an int.

getAsIntsback to summary
public int[] getAsInts()

Returns TIFFTag.TIFF_SLONG data as an array of ints (signed 32-bit integers).

Returns:int[]

The data as an array of ints.

Exceptions
ClassCastException:
if the field is not of type TIFF_SHORT, TIFF_SSHORT, or TIFF_SLONG.
getAsLongback to summary
public long getAsLong(int index)

Returns data in any format as a long.

TIFFTag.TIFF_BYTE and TIFF_UNDEFINED data are treated as unsigned; that is, no sign extension will take place and the returned value will be in the range [0, 255]. TIFF_SBYTE data will be returned in the range [-128, 127].

Data in TIFF_FLOAT and TIFF_DOUBLE are simply cast to long and may suffer from truncation.

Data in TIFF_SRATIONAL or TIFF_RATIONAL format are evaluated by dividing the numerator into the denominator using double-precision arithmetic and then casting to long. Loss of precision and truncation may occur.

Data in TIFF_ASCII format will be parsed as by the Double.parseDouble method, with the result cast to long.

Parameters
index:int

The index of the data.

Returns:long

The data at the given index as a long.

getAsLongsback to summary
public long[] getAsLongs()

Returns TIFFTag.TIFF_LONG or TIFF_IFD_POINTER data as an array of longs (signed 64-bit integers).

Returns:long[]

The data as an array of longs.

Exceptions
ClassCastException:
if the field is not of type TIFF_LONG or TIFF_IFD_POINTER.
getAsNativeNodeback to summary
public Node getAsNativeNode()

Returns the TIFFField as a node named either "TIFFField" or "TIFFIFD" as described in the TIFF native image metadata specification. The node will be named "TIFFIFD" if and only if hasDirectory() returns true and the field's type is either TIFFTag#TIFF_LONG or TIFFTag#TIFF_IFD_POINTER.

Returns:Node

a Node named "TIFFField" or "TIFFIFD".

getAsRationalback to summary
public long[] getAsRational(int index)

Returns a TIFFTag.TIFF_RATIONAL data item as a two-element array of ints.

Parameters
index:int

The index of the data.

Returns:long[]

The data at the given index as an unsigned rational.

Exceptions
ClassCastException:
if the field is not of type TIFF_RATIONAL.
getAsRationalsback to summary
public long[][] getAsRationals()

Returns TIFFTag.TIFF_RATIONAL data as an array of 2-element arrays of longs.

Returns:long[][]

The data as an array of unsigned rationals.

Exceptions
ClassCastException:
if the field is not of type TIFF_RATIONAL.
getAsShortsback to summary
public short[] getAsShorts()

Returns TIFFTag.TIFF_SSHORT data as an array of shorts (signed 16-bit integers).

Returns:short[]

The data as an array of shorts.

Exceptions
ClassCastException:
if the field is not of type TIFF_SSHORT.
getAsSRationalback to summary
public int[] getAsSRational(int index)

Returns a TIFFTag.TIFF_SRATIONAL data item as a two-element array of ints.

Parameters
index:int

The index of the data.

Returns:int[]

The data at the given index as a signed rational.

Exceptions
ClassCastException:
if the field is not of type TIFF_SRATIONAL.
getAsSRationalsback to summary
public int[][] getAsSRationals()

Returns TIFFTag.TIFF_SRATIONAL data as an array of 2-element arrays of ints.

Returns:int[][]

The data as an array of signed rationals.

Exceptions
ClassCastException:
if the field is not of type TIFF_SRATIONAL.
getAsStringback to summary
public String getAsString(int index)

Returns a TIFFTag.TIFF_ASCII value as a String.

Parameters
index:int

The index of the data.

Returns:String

The data at the given index as a String.

Exceptions
ClassCastException:
if the field is not of type TIFF_ASCII.
getAttributeback to summary
private static String getAttribute(Node node, String attrName)
getCountback to summary
public int getCount()

Returns the number of data items present in the field. For TIFFTag.TIFF_ASCII fields, the value returned is the number of Strings, not the total length of the data as in the file representation.

Returns:int

The number of data items present in the field.

getDataback to summary
public Object getData()

Returns a reference to the data object associated with the field.

Returns:Object

The data object of the field.

getDirectoryback to summary
public TIFFDirectory getDirectory()

Returns the associated TIFFDirectory, if available. If no directory is set, then null will be returned.

Returns:TIFFDirectory

the TIFFDirectory instance or null.

getTagback to summary
public TIFFTag getTag()

Retrieves the tag associated with this field.

Returns:TIFFTag

The associated TIFFTag.

getTagNumberback to summary
public int getTagNumber()

Retrieves the tag number in the range [0,65535].

Returns:int

The tag number.

getTypeback to summary
public int getType()

Returns the type of the data stored in the field. For a TIFF 6.0 stream, the value will equal one of the TIFFTag.TIFF_* constants. For future revisions of TIFF, higher values are possible.

Returns:int

The data type of the field value.

getTypeByNameback to summary
public static int getTypeByName(String typeName)

Returns the data type constant corresponding to the supplied data type name. If the name is unknown -1 will be returned.

Parameters
typeName:String

The type name.

Returns:int

One of the TIFFTag.TIFF_* constants or -1 if the name is not recognized.

getTypeNameback to summary
public static String getTypeName(int dataType)

Returns the name of the supplied data type constant.

Parameters
dataType:int

One of the TIFFTag.TIFF_* constants indicating the data type of the field as written to the TIFF stream.

Returns:String

The type name corresponding to the supplied type constant.

Exceptions
IllegalArgumentException:
if dataType is not one of the TIFFTag.TIFF_* data type constants.
getValueAsStringback to summary
public String getValueAsString(int index)

Returns a String containing a human-readable version of the data item. Data of type TIFFTag.TIFF_RATIONAL or TIFF_SRATIONAL are represented as a pair of integers separated by a '/' character. If the numerator of a TIFFTag.TIFF_RATIONAL or TIFF_SRATIONAL is an integral multiple of the denominator, then the value is represented as "q/1" where q is the quotient of the numerator and denominator.

Parameters
index:int

The index of the data.

Returns:String

The data at the given index as a String.

Exceptions
ClassCastException:
if the field is not of one of the legal field types.
hasDirectoryback to summary
public boolean hasDirectory()

Returns whether the field has a TIFFDirectory.

Returns:boolean

true if and only if getDirectory() returns non-null.

initDataback to summary
private static void initData(Node node, int[] otype, int[] ocount, Object[] odata)
isIntegralback to summary
public boolean isIntegral()

Indicates whether the value associated with the field is of integral data type.

Returns:boolean

Whether the field type is integral.