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

# Class TiffOutputDirectory

java.lang.Object
org.apache.commons.imaging.formats.tiff.write.TiffOutputDirectory

All Implemented Interfaces:
  `Iterable<TiffOutputField>`

public final class TiffOutputDirectory extends Object implements Iterable<TiffOutputField>

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final Comparator<TiffOutputDirectory>`
  `COMPARATOR`
  `static final long`
  `UNDEFINED_VALUE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TiffOutputDirectory(int type, ByteOrder byteOrder)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `add(TagInfoAsciiOrByte tagInfo, String... values)`
  `void`
  `add(TagInfoAsciiOrRational tagInfo, String... values)`
  `void`
  `add(TagInfoAsciiOrRational tagInfo, RationalNumber... values)`
  `void`
  `add(TagInfoAscii tagInfo, String... values)`
  `void`
  `add(TagInfoByteOrShort tagInfo, byte... values)`
  `void`
  `add(TagInfoByteOrShort tagInfo, short... values)`
  `void`
  `add(TagInfoByte tagInfo, byte value)`
  `void`
  `add(TagInfoBytes tagInfo, byte... values)`
  `void`
  `add(TagInfoDouble tagInfo, double value)`
  `void`
  `add(TagInfoDoubles tagInfo, double... values)`
  `void`
  `add(TagInfoFloat tagInfo, float value)`
  `void`
  `add(TagInfoFloats tagInfo, float... values)`
  `void`
  `add(TagInfoGpsText tagInfo, String value)`
  `void`
  `add(TagInfoLong tagInfo, int value)`
  `void`
  `add(TagInfoLongs tagInfo, int... values)`
  `void`
  `add(TagInfoRational tagInfo, RationalNumber value)`
  `void`
  `add(TagInfoRationals tagInfo, RationalNumber... values)`
  `void`
  `add(TagInfoSByte tagInfo, byte value)`
  `void`
  `add(TagInfoSBytes tagInfo, byte... values)`
  `void`
  `add(TagInfoShortOrLongOrRational tagInfo, int... values)`
  `void`
  `add(TagInfoShortOrLongOrRational tagInfo, short... values)`
  `void`
  `add(TagInfoShortOrLongOrRational tagInfo, RationalNumber... values)`
  `void`
  `add(TagInfoShortOrLong tagInfo, int... values)`
  `void`
  `add(TagInfoShortOrLong tagInfo, short... values)`
  `void`
  `add(TagInfoShortOrRational tagInfo, short... values)`
  `void`
  `add(TagInfoShortOrRational tagInfo, RationalNumber... values)`
  `void`
  `add(TagInfoShort tagInfo, short value)`
  `void`
  `add(TagInfoShorts tagInfo, short... values)`
  `void`
  `add(TagInfoSLong tagInfo, int value)`
  `void`
  `add(TagInfoSLongs tagInfo, int... values)`
  `void`
  `add(TagInfoSRational tagInfo, RationalNumber value)`
  `void`
  `add(TagInfoSRationals tagInfo, RationalNumber... values)`
  `void`
  `add(TagInfoSShort tagInfo, short value)`
  `void`
  `add(TagInfoSShorts tagInfo, short... values)`
  `void`
  `add(TagInfoXpString tagInfo, String value)`
  `void`
  `add(TiffOutputField field)`
  `String`
  `description()`
  `TiffOutputField`
  `findField(int tag)`
  Finds the TiffOutputField for the given tag from this TiffOutputDirectory.
  `TiffOutputField`
  `findField(TagInfo tagInfo)`
  Finds the TiffOutputField for the given TagInfo from this TiffOutputDirectory.
  `List<TiffOutputField>`
  `getFields()`
  `String`
  `getItemDescription()`
  `int`
  `getItemLength()`
  `protected long`
  `getOffset()`
  `protected List<org.apache.commons.imaging.formats.tiff.write.AbstractTiffOutputItem>`
  `getOutputItems(org.apache.commons.imaging.formats.tiff.write.TiffOutputSummary outputSummary)`
  `JpegImageData`
  `getRawJpegImageData()`
  `AbstractTiffImageData`
  `getRawTiffImageData()`
  `int`
  `getType()`
  `Iterator<TiffOutputField>`
  `iterator()`
  `void`
  `removeField(int tag)`
  `void`
  `removeField(TagInfo tagInfo)`
  `void`
  `setJpegImageData(JpegImageData rawJpegImageData)`
  `void`
  `setNextDirectory(TiffOutputDirectory nextDirectory)`
  `protected void`
  `setOffset(long offset)`
  `void`
  `setTiffImageData(AbstractTiffImageData rawTiffImageData)`
  `void`
  `sortFields()`
  `void`
  `writeItem(AbstractBinaryOutputStream bos)`

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

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

  ### Methods inherited from interface java.lang.Iterable

  `forEach, spliterator`

- ## Field Details

  - ### COMPARATOR

    public static final Comparator<TiffOutputDirectory> COMPARATOR

  - ### UNDEFINED_VALUE

    public static final long UNDEFINED_VALUE
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### TiffOutputDirectory

    public TiffOutputDirectory(int type, ByteOrder byteOrder)

- ## Method Details

  - ### add

    public void add(TagInfoAscii tagInfo, String... values) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoAsciiOrByte tagInfo, String... values) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoAsciiOrRational tagInfo, RationalNumber... values) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoAsciiOrRational tagInfo, String... values) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoByte tagInfo, byte value) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoByteOrShort tagInfo, byte... values) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoByteOrShort tagInfo, short... values) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoBytes tagInfo, byte... values) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoDouble tagInfo, double value) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoDoubles tagInfo, double... values) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoFloat tagInfo, float value) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoFloats tagInfo, float... values) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoGpsText tagInfo, String value) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoLong tagInfo, int value) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoLongs tagInfo, int... values) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoRational tagInfo, RationalNumber value) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoRationals tagInfo, RationalNumber... values) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoSByte tagInfo, byte value) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoSBytes tagInfo, byte... values) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoShort tagInfo, short value) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoShortOrLong tagInfo, int... values) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoShortOrLong tagInfo, short... values) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoShortOrLongOrRational tagInfo, int... values) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoShortOrLongOrRational tagInfo, RationalNumber... values) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoShortOrLongOrRational tagInfo, short... values) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoShortOrRational tagInfo, RationalNumber... values) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoShortOrRational tagInfo, short... values) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoShorts tagInfo, short... values) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoSLong tagInfo, int value) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoSLongs tagInfo, int... values) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoSRational tagInfo, RationalNumber value) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoSRationals tagInfo, RationalNumber... values) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoSShort tagInfo, short value) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoSShorts tagInfo, short... values) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TagInfoXpString tagInfo, String value) throws ImagingException
    Throws:
      `ImagingException`

  - ### add

    public void add(TiffOutputField field)

  - ### description

    public String description()

  - ### findField

    public TiffOutputField findField(int tag)
    Finds the TiffOutputField for the given tag from this TiffOutputDirectory.

    If there is no field matching the given tag, null will be returned.

    Parameters:
      `tag` - the tag specifying the field
    Returns:
      the field matching tagInfo or null, if the field isn't present
    See Also:
      - `findField(TagInfo)`

  - ### findField

    public TiffOutputField findField(TagInfo tagInfo)
    Finds the TiffOutputField for the given TagInfo from this TiffOutputDirectory.

    If there is no field matching the given TagInfo, null will be returned.

    Parameters:
      `tagInfo` - the TagInfo specifying the field
    Returns:
      the field matching tagInfo or null, if the field isn't present
    See Also:
      - `findField(int)`

  - ### getFields

    public List<TiffOutputField> getFields()

  - ### getItemDescription

    public String getItemDescription()

  - ### getItemLength

    public int getItemLength()

  - ### getOutputItems

    protected List<org.apache.commons.imaging.formats.tiff.write.AbstractTiffOutputItem> getOutputItems(org.apache.commons.imaging.formats.tiff.write.TiffOutputSummary outputSummary) throws ImagingException
    Throws:
      `ImagingException`

  - ### getRawJpegImageData

    public JpegImageData getRawJpegImageData()

  - ### getRawTiffImageData

    public AbstractTiffImageData getRawTiffImageData()

  - ### getType

    public int getType()

  - ### iterator

    public Iterator<TiffOutputField> iterator()
    Specified by:
      `iterator` in interface `Iterable<TiffOutputField>`

  - ### removeField

    public void removeField(int tag)

  - ### removeField

    public void removeField(TagInfo tagInfo)

  - ### setJpegImageData

    public void setJpegImageData(JpegImageData rawJpegImageData)

  - ### setNextDirectory

    public void setNextDirectory(TiffOutputDirectory nextDirectory)

  - ### setTiffImageData

    public void setTiffImageData(AbstractTiffImageData rawTiffImageData)

  - ### sortFields

    public void sortFields()

  - ### writeItem

    public void writeItem(AbstractBinaryOutputStream bos) throws IOException, ImagingException
    Throws:
      `IOException`
      `ImagingException`

  - ### getOffset

    protected long getOffset()

  - ### setOffset

    protected void setOffset(long offset)