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

# Class FieldTypeAscii

java.lang.Object
org.apache.commons.imaging.formats.tiff.fieldtypes.AbstractFieldType
org.apache.commons.imaging.formats.tiff.fieldtypes.FieldTypeAscii

public class FieldTypeAscii extends AbstractFieldType

- ## Field Summary

  ### Fields inherited from class org.apache.commons.imaging.formats.tiff.fieldtypes.AbstractFieldType

  `ANY, ASCII, ASCII_OR_BYTE, ASCII_OR_RATIONAL, BYTE, BYTE_OR_SHORT, DOUBLE, FLOAT, IFD, IFD8, LONG, LONG_OR_IFD, LONG_OR_SHORT, LONG8, RATIONAL, SBYTE, SHORT, SHORT_OR_LONG, SHORT_OR_LONG_OR_RATIONAL, SHORT_OR_RATIONAL, SLONG, SLONG8, SRATIONAL, SSHORT, UNDEFINED`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FieldTypeAscii(int type, String name)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `getValue(TiffField entry)`
  Gets the value from a TIFF field.
  `byte[]`
  `writeData(Object o, ByteOrder byteOrder)`
  Converts the given object to a byte array.

  ### Methods inherited from class org.apache.commons.imaging.formats.tiff.fieldtypes.AbstractFieldType

  `getFieldType, getName, getSize, getType`

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

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

- ## Constructor Details

  - ### FieldTypeAscii

    public FieldTypeAscii(int type, String name)

- ## Method Details

  - ### getValue

    public Object getValue(TiffField entry)
    Description copied from class: `AbstractFieldType`
    Gets the value from a TIFF field.
    Specified by:
      `getValue` in class `AbstractFieldType`
    Parameters:
      `entry` - the TIFF field.
    Returns:
      the value.

  - ### writeData

    public byte[] writeData(Object o, ByteOrder byteOrder) throws ImagingException
    Description copied from class: `AbstractFieldType`
    Converts the given object to a byte array.
    Specified by:
      `writeData` in class `AbstractFieldType`
    Parameters:
      `o` - input.
      `byteOrder` - output byte order; not used by all subclasses.
    Returns:
      a byte array.
    Throws:
      `ImagingException` - Thrown on a bad input.