Package loci.formats.tiff
Enum Class IFDType
- All Implemented Interfaces:
Serializable,Comparable<IFDType>,java.lang.constant.Constable,loci.common.enumeration.CodedEnum
An enumeration of IFD types.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateIFDType(int code, int bytesPerElement) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic IFDTypeget(int code) Retrieves a IFD type by reverse lookup of its "code".intRetrieves the number of bytes per element.intgetCode()static IFDTypeGet the type corresponding to the given value.static IFDTypeReturns the enum constant of this class with the specified name.static IFDType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BYTE
-
ASCII
-
SHORT
-
LONG
-
RATIONAL
-
SBYTE
-
UNDEFINED
-
SSHORT
-
SLONG
-
SRATIONAL
-
FLOAT
-
DOUBLE
-
IFD
-
LONG8
-
SLONG8
-
IFD8
-
-
Field Details
-
code
private int codeCode for the IFD type in the actual TIFF file. -
bytesPerElement
private int bytesPerElementNumber of bytes per element of this type. -
lookup
-
-
Constructor Details
-
IFDType
private IFDType(int code, int bytesPerElement) Default constructor.- Parameters:
code- Integer "code" for the IFD type.bytesPerElement- Number of bytes per element.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
get
Retrieves a IFD type by reverse lookup of its "code".- Parameters:
code- The code to look up.- Returns:
- The
IFDTypeinstance for thecodeornullif it does not exist.
-
getCode
public int getCode()- Specified by:
getCodein interfaceloci.common.enumeration.CodedEnum
-
getBytesPerElement
public int getBytesPerElement()Retrieves the number of bytes per element.- Returns:
- See above.
-
getType
Get the type corresponding to the given value.- Parameters:
value- IFD valuebigTiff- true if BigTIFF will be written (impacts long values)- Returns:
- appropriate IFDType for the given value
- Throws:
FormatException- if an appropriate IFDType cannot be determined
-