Packages

 

com.aspose.cad.fileformats.tiff

Class TiffDataType

    • Method Summary

      Methods 
      Modifier and Type Method and Description
      int compareTo(Object obj)
      Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
      TiffDataType deepClone()
      Performs a deep clone of this instance.
      long getAlignedDataSize()
      Gets the additional data size in bytes (in case the 12 bytes is not enough to fit the tag data).
      abstract long getCount()
      Gets the count of elements.
      abstract long getDataSize()
      Gets the additional data size in bytes (in case the 12 bytes is not enough to fit the tag data).
      int getId()
      Gets tag id integer representation.
      int getTagId()
      Gets the tag id.
      abstract int getTagType()
      Gets the tag type.
      abstract Object getValue()
      Gets or sets the value this data type contains.
      boolean isValid()
      Gets a value indicating whether tag data is valid.
      static TiffDataType readTag(TiffStreamReader dataStream, long position)
      Reads the tag data.
      abstract void setValue(Object value)
      Gets or sets the value this data type contains.
      String toString()
      Returns a System.String that represents this instance.
      abstract long writeAdditionalData(TiffStreamWriter dataStream)
      Writes the additional tag data.
      void writeTag(TiffStreamWriter dataStream, long additionalDataOffset)
      Writes the tag data.
    • Method Detail

      • getCount

        public abstract long getCount()

        Gets the count of elements.

        Returns:
        The count of elements.
      • getId

        public int getId()

        Gets tag id integer representation.

      • getTagId

        public int getTagId()

        Gets the tag id.

        Returns:
        The tag id.
      • getTagType

        public abstract int getTagType()

        Gets the tag type.

        Returns:
        The tag type.
      • getAlignedDataSize

        public long getAlignedDataSize()

        Gets the additional data size in bytes (in case the 12 bytes is not enough to fit the tag data).

        Returns:
        The additional data size in bytes.


        This is the data bytes count aligned to word boundary.

      • getDataSize

        public abstract long getDataSize()

        Gets the additional data size in bytes (in case the 12 bytes is not enough to fit the tag data).

        Returns:
        The additional data size in bytes.


        This is exact bytes count.

      • getValue

        public abstract Object getValue()

        Gets or sets the value this data type contains.

        Returns:
        The value.
      • setValue

        public abstract void setValue(Object value)

        Gets or sets the value this data type contains.

        Parameters:
        value - The value.
      • isValid

        public boolean isValid()

        Gets a value indicating whether tag data is valid. The valid tag contains data which may be preserved. The invalid tag cannot be stored.

        Returns:
        true if tag data is valid; otherwise, false.
      • readTag

        public static TiffDataType readTag(TiffStreamReader dataStream,
                           long position)

        Reads the tag data.

        Parameters:
        dataStream - The data stream.
        position - The tag position.
        Returns:
        The read tag.
        Throws:
        com.aspose.ms.System.ArgumentNullException - dataStream
      • compareTo

        public int compareTo(Object obj)

        Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

        Specified by:
        compareTo in interface Comparable
        Parameters:
        obj - An object to compare with this instance.
        Returns:
        A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance is less than obj. Zero This instance is equal to obj. Greater than zero This instance is greater than obj.
        Throws:
        TiffImageException - Expected TiffDataType type.
      • deepClone

        public TiffDataType deepClone()

        Performs a deep clone of this instance.

        Returns:
        A deep clone of the current instance.
      • writeTag

        public void writeTag(TiffStreamWriter dataStream,
                    long additionalDataOffset)

        Writes the tag data.

        Parameters:
        dataStream - The data stream.
        additionalDataOffset - The offset to write additional data to.
        Throws:
        ImageSaveException - Unable to Write values for + this.TagType + Message : + exception.Message
      • writeAdditionalData

        public abstract long writeAdditionalData(TiffStreamWriter dataStream)

        Writes the additional tag data.

        Parameters:
        dataStream - The data stream.
        Returns:
        The actual bytes written.
      • toString

        public String toString()

        Returns a System.String that represents this instance.

        Overrides:
        toString in class Object
        Returns:
        A System.String that represents this instance.