Package org.apache.commons.imaging.formats.tiff.fieldtypes

## Class FieldType

- java.lang.Object
- - org.apache.commons.imaging.formats.tiff.fieldtypes.FieldType

- Direct Known Subclasses:
    `FieldTypeAscii`, `FieldTypeByte`, `FieldTypeDouble`, `FieldTypeFloat`, `FieldTypeLong`, `FieldTypeRational`, `FieldTypeShort`

      public abstract class FieldType
      extends Object

  TIFF field types.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static List<FieldType>` | `ANY` |
    `static FieldTypeAscii` | `ASCII` |
    `static List<FieldType>` | `ASCII_OR_BYTE` |
    `static List<FieldType>` | `ASCII_OR_RATIONAL` |
    `static FieldTypeByte` | `BYTE` |
    `static List<FieldType>` | `BYTE_OR_SHORT` |
    `static FieldTypeDouble` | `DOUBLE` |
    `static FieldTypeFloat` | `FLOAT` |
    `static FieldTypeLong` | `IFD` |
    `static FieldTypeLong` | `LONG` |
    `static List<FieldType>` | `LONG_OR_IFD` |
    `static List<FieldType>` | `LONG_OR_SHORT` |
    `static FieldTypeRational` | `RATIONAL` |
    `static FieldTypeByte` | `SBYTE` |
    `static FieldTypeShort` | `SHORT` |
    `static List<FieldType>` | `SHORT_OR_LONG` |
    `static List<FieldType>` | `SHORT_OR_LONG_OR_RATIONAL` |
    `static List<FieldType>` | `SHORT_OR_RATIONAL` |
    `static FieldTypeLong` | `SLONG` |
    `static FieldTypeRational` | `SRATIONAL` |
    `static FieldTypeShort` | `SSHORT` |
    `static FieldTypeByte` | `UNDEFINED` |

  - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `FieldType​(int type, String name, int elementSize)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static FieldType` | `getFieldType​(int type)` |
    `String` | `getName()` |
    `int` | `getSize()` |
    `int` | `getType()` |
    `abstract Object` | `getValue​(TiffField entry)` |
    `abstract byte[]` | `writeData​(Object o, ByteOrder byteOrder)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### BYTE

          public static final FieldTypeByte BYTE

    - #### ASCII

          public static final FieldTypeAscii ASCII

    - #### SHORT

          public static final FieldTypeShort SHORT

    - #### LONG

          public static final FieldTypeLong LONG

    - #### RATIONAL

          public static final FieldTypeRational RATIONAL

    - #### SBYTE

          public static final FieldTypeByte SBYTE

    - #### UNDEFINED

          public static final FieldTypeByte UNDEFINED

    - #### SSHORT

          public static final FieldTypeShort SSHORT

    - #### SLONG

          public static final FieldTypeLong SLONG

    - #### SRATIONAL

          public static final FieldTypeRational SRATIONAL

    - #### FLOAT

          public static final FieldTypeFloat FLOAT

    - #### DOUBLE

          public static final FieldTypeDouble DOUBLE

    - #### IFD

          public static final FieldTypeLong IFD

    - #### ANY

          public static final List<FieldType> ANY

    - #### SHORT_OR_LONG

          public static final List<FieldType> SHORT_OR_LONG

    - #### SHORT_OR_RATIONAL

          public static final List<FieldType> SHORT_OR_RATIONAL

    - #### SHORT_OR_LONG_OR_RATIONAL

          public static final List<FieldType> SHORT_OR_LONG_OR_RATIONAL

    - #### LONG_OR_SHORT

          public static final List<FieldType> LONG_OR_SHORT

    - #### BYTE_OR_SHORT

          public static final List<FieldType> BYTE_OR_SHORT

    - #### LONG_OR_IFD

          public static final List<FieldType> LONG_OR_IFD

    - #### ASCII_OR_RATIONAL

          public static final List<FieldType> ASCII_OR_RATIONAL

    - #### ASCII_OR_BYTE

          public static final List<FieldType> ASCII_OR_BYTE

  - ### Constructor Detail

    - #### FieldType

          protected FieldType​(int type,
                              String name,
                              int elementSize)

  - ### Method Detail

    - #### getType

          public int getType()

    - #### getName

          public String getName()

    - #### getSize

          public int getSize()

    - #### getFieldType

          public static FieldType getFieldType​(int type)
                                        throws ImageReadException

      Throws:
        `ImageReadException`

    - #### getValue

          public abstract Object getValue​(TiffField entry)

    - #### writeData

          public abstract byte[] writeData​(Object o,
                                           ByteOrder byteOrder)
                                    throws ImageWriteException

      Throws:
        `ImageWriteException`