public enum FieldType extends Enum<FieldType>
| Enum Constant and Description |
|---|
ASCII
8-bit byte that contains a 7-bit ASCII code; the last byte must be NUL
(binary zero)
|
BYTE
8-bit unsigned integer
|
DOUBLE
Double precision (8-byte) IEEE format
|
FLOAT
Single precision (4-byte) IEEE format
|
LONG
32-bit (4-byte) unsigned integer
|
RATIONAL
Two LONGs: the first represents the numerator of a fraction; the second,
the denominator
|
SBYTE
An 8-bit signed (twos-complement) integer
|
SHORT
16-bit (2-byte) unsigned integer
|
SLONG
A 32-bit (4-byte) signed (twos-complement) integer
|
SRATIONAL
Two SLONG’s: the first represents the numerator of a fraction, the second
the denominator
|
SSHORT
A 16-bit (2-byte) signed (twos-complement) integer
|
UNDEFINED
An 8-bit byte that may contain anything, depending on the definition of
the field
|
| Modifier and Type | Method and Description |
|---|---|
int |
getBits()
Get the number of bits per value
|
int |
getBytes()
Get the number of bytes per value
|
static FieldType |
getFieldType(int fieldType)
Get the field type
|
static FieldType |
getFieldType(int sampleFormat,
int bitsPerSample)
Get the field type of the sample format and bits per sample
|
static int |
getSampleFormat(FieldType fieldType)
Get the sample format of the field type
|
int |
getValue()
Get the field type value
|
static FieldType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static FieldType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FieldType BYTE
public static final FieldType ASCII
public static final FieldType SHORT
public static final FieldType LONG
public static final FieldType RATIONAL
public static final FieldType SBYTE
public static final FieldType UNDEFINED
public static final FieldType SSHORT
public static final FieldType SLONG
public static final FieldType SRATIONAL
public static final FieldType FLOAT
public static final FieldType DOUBLE
public static FieldType[] values()
for (FieldType c : FieldType.values()) System.out.println(c);
public static FieldType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic int getValue()
public int getBytes()
public int getBits()
public static FieldType getFieldType(int fieldType)
fieldType - field type numberpublic static FieldType getFieldType(int sampleFormat, int bitsPerSample)
sampleFormat - sample formatbitsPerSample - bits per samplepublic static int getSampleFormat(FieldType fieldType)
fieldType - field typeCopyright © 2017 National Geospatial-Intelligence Agency. All rights reserved.