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

## Class TiffOutputDirectory

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

-     public final class TiffOutputDirectory
      extends Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `TiffOutputItem.Value`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Comparator<TiffOutputDirectory>` | `COMPARATOR`
    `int` | `type`
    `static long` | `UNDEFINED_VALUE`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(TagInfoAsciiOrByte tagInfo, String... values)`
    `void` | `add(TagInfoAsciiOrRational tagInfo, RationalNumber... values)`
    `void` | `add(TagInfoAsciiOrRational tagInfo, String... values)`
    `void` | `add(TagInfoAscii tagInfo, String... values)`
    `void` | `add(TagInfoByte tagInfo, byte value)`
    `void` | `add(TagInfoByteOrShort tagInfo, byte... values)`
    `void` | `add(TagInfoByteOrShort tagInfo, short... values)`
    `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(TagInfoShortOrLong tagInfo, int... values)`
    `void` | `add(TagInfoShortOrLongOrRational tagInfo, int... values)`
    `void` | `add(TagInfoShortOrLongOrRational tagInfo, RationalNumber... values)`
    `void` | `add(TagInfoShortOrLongOrRational tagInfo, short... values)`
    `void` | `add(TagInfoShortOrLong tagInfo, short... values)`
    `void` | `add(TagInfoShortOrRational tagInfo, RationalNumber... values)`
    `void` | `add(TagInfoShortOrRational tagInfo, short... 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.TiffOutputItem>` | `getOutputItems(org.apache.commons.imaging.formats.tiff.write.TiffOutputSummary outputSummary)`
    `JpegImageData` | `getRawJpegImageData()`
    `TiffImageData` | `getRawTiffImageData()`
    `void` | `removeField(int tag)`
    `void` | `removeField(TagInfo tagInfo)`
    `void` | `setJpegImageData(JpegImageData rawJpegImageData)`
    `void` | `setNextDirectory(TiffOutputDirectory nextDirectory)`
    `protected void` | `setOffset(long offset)`
    `void` | `setTiffImageData(TiffImageData rawTiffImageData)`
    `void` | `sortFields()`
    `void` | `writeItem(BinaryOutputStream bos)`

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

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

- - ### Field Detail

    - #### type

          public final int type

    - #### COMPARATOR

          public static final Comparator<TiffOutputDirectory> COMPARATOR

    - #### UNDEFINED_VALUE

          public static final long UNDEFINED_VALUE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### TiffOutputDirectory

          public TiffOutputDirectory(int type,
                                     ByteOrder byteOrder)

  - ### Method Detail

    - #### setNextDirectory

          public void setNextDirectory(TiffOutputDirectory nextDirectory)

    - #### add

          public void add(TagInfoByte tagInfo,
                          byte value)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoBytes tagInfo,
                          byte... values)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoAscii tagInfo,
                          String... values)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoShort tagInfo,
                          short value)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoShorts tagInfo,
                          short... values)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoLong tagInfo,
                          int value)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoLongs tagInfo,
                          int... values)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoRational tagInfo,
                          RationalNumber value)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoRationals tagInfo,
                          RationalNumber... values)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoSByte tagInfo,
                          byte value)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoSBytes tagInfo,
                          byte... values)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoSShort tagInfo,
                          short value)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoSShorts tagInfo,
                          short... values)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoSLong tagInfo,
                          int value)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoSLongs tagInfo,
                          int... values)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoSRational tagInfo,
                          RationalNumber value)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoSRationals tagInfo,
                          RationalNumber... values)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoFloat tagInfo,
                          float value)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoFloats tagInfo,
                          float... values)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoDouble tagInfo,
                          double value)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoDoubles tagInfo,
                          double... values)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoByteOrShort tagInfo,
                          byte... values)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoByteOrShort tagInfo,
                          short... values)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoShortOrLong tagInfo,
                          short... values)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoShortOrLong tagInfo,
                          int... values)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoShortOrLongOrRational tagInfo,
                          short... values)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoShortOrLongOrRational tagInfo,
                          int... values)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoShortOrLongOrRational tagInfo,
                          RationalNumber... values)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoShortOrRational tagInfo,
                          short... values)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoShortOrRational tagInfo,
                          RationalNumber... values)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoGpsText tagInfo,
                          String value)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoXpString tagInfo,
                          String value)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoAsciiOrByte tagInfo,
                          String... values)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoAsciiOrRational tagInfo,
                          String... values)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TagInfoAsciiOrRational tagInfo,
                          RationalNumber... values)
                   throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### add

          public void add(TiffOutputField field)

    - #### getFields

          public List<TiffOutputField> getFields()

    - #### removeField

          public void removeField(TagInfo tagInfo)

    - #### removeField

          public void removeField(int tag)

    - #### 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)`

    - #### 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)`

    - #### sortFields

          public void sortFields()

    - #### description

          public String description()

    - #### writeItem

          public void writeItem(BinaryOutputStream bos)
                         throws IOException,
                                ImageWriteException

      Throws:
        `IOException`
        `ImageWriteException`

    - #### setJpegImageData

          public void setJpegImageData(JpegImageData rawJpegImageData)

    - #### getRawJpegImageData

          public JpegImageData getRawJpegImageData()

    - #### setTiffImageData

          public void setTiffImageData(TiffImageData rawTiffImageData)

    - #### getRawTiffImageData

          public TiffImageData getRawTiffImageData()

    - #### getItemLength

          public int getItemLength()

    - #### getItemDescription

          public String getItemDescription()

    - #### getOutputItems

          protected List<org.apache.commons.imaging.formats.tiff.write.TiffOutputItem> getOutputItems(org.apache.commons.imaging.formats.tiff.write.TiffOutputSummary outputSummary)
                                                                                               throws ImageWriteException

      Throws:
        `ImageWriteException`

    - #### getOffset

          protected long getOffset()

    - #### setOffset

          protected void setOffset(long offset)

Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.