public abstract class TiffDataType extends Object implements Comparable<TiffDataType>
The TIFF data type.
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(TiffDataType 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.
|
boolean |
equals(Object obj) |
long |
getAdditionalDataSize(byte sizeOfTagValue)
Gets the additional tag value size in bytes (in case the tag can not fit the whole tag value).
|
long |
getAlignedDataSize(byte sizeOfTagValue)
Gets the data size aligned in 4-byte (int) or 8-byte (long) boundary.
|
abstract long |
getCount()
Gets the count of elements.
|
long |
getDataSize()
Gets the tag value size.
|
byte |
getElementSize()
Gets the element size in bytes.
|
int |
getId()
Gets tag id as number.
|
int |
getTagId()
Gets the tag id.
|
abstract int |
getTagType()
Gets the tag type.
|
abstract Object |
getValue()
Gets the value this data type contains.
|
int |
hashCode() |
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)
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.
|
public byte getElementSize()
Gets the element size in bytes.
public long getDataSize()
Gets the tag value size.
public abstract long getCount()
Gets the count of elements.
Value: The count of elements.public final int getId()
Gets tag id as number.
public int getTagId()
Gets the tag id.
public abstract int getTagType()
Gets the tag type.
public final long getAlignedDataSize(byte sizeOfTagValue)
Gets the data size aligned in 4-byte (int) or 8-byte (long) boundary.
sizeOfTagValue - Size of tag value.public long getAdditionalDataSize(byte sizeOfTagValue)
Gets the additional tag value size in bytes (in case the tag can not fit the whole tag value).
sizeOfTagValue - Size of tag value: 4 or 8 for BigTiff.public abstract Object getValue()
Gets the value this data type contains.
public abstract void setValue(Object value)
Sets the value this data type contains.
value - The value.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.
true if tag data is valid; otherwise, false.public static TiffDataType readTag(TiffStreamReader dataStream, long position)
Reads the tag data.
dataStream - The data stream.position - The tag position.com.aspose.ms.System.ArgumentNullException - dataStreampublic int compareTo(TiffDataType 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.
compareTo in interface Comparable<TiffDataType>obj - An object to compare with this instance.obj.
Zero
This instance is equal to obj.
Greater than zero
This instance is greater than obj.TiffImageException - Expected TiffDataType type.public TiffDataType deepClone()
Performs a deep clone of this instance.
public void writeTag(TiffStreamWriter dataStream, long additionalDataOffset)
Writes the tag data.
dataStream - The data stream.additionalDataOffset - The offset to write additional data to.ImageSaveException - Unable to Write values for + this.TagType + Message : + exception.Messagepublic abstract long writeAdditionalData(TiffStreamWriter dataStream)
Writes the additional tag data.
dataStream - The data stream.Copyright (c) 2008-2025 Aspose Pty Ltd. All Rights Reserved.