TiffStreamReader
Inheritance: java.lang.Object, com.aspose.fileformats.fileformats.tiff.filemanagement.TiffStreamSeeker
public class TiffStreamReader extends TiffStreamSeeker
用于处理小端 TIFF 文件格式的 tiff 流。
构造函数
| 构造函数 | 描述 |
|---|---|
| TiffStreamReader(byte[] data) | 初始化 TiffStreamReader 类的新实例。 |
| TiffStreamReader(byte[] data, int startIndex) | 初始化 TiffStreamReader 类的新实例。 |
| TiffStreamReader(byte[] data, int startIndex, int dataLength) | 初始化 TiffStreamReader 类的新实例。 |
| TiffStreamReader(StreamContainer streamContainer) | 初始化 TiffStreamReader 类的新实例。 |
方法
TiffStreamReader(byte[] data)
public TiffStreamReader(byte[] data)
初始化 TiffStreamReader 类的新实例。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 数据 | byte[] | 字节数组数据。 |
TiffStreamReader(byte[] data, int startIndex)
public TiffStreamReader(byte[] data, int startIndex)
初始化 TiffStreamReader 类的新实例。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 数据 | byte[] | 字节数组数据。 |
| startIndex | int | data 的起始索引。 |
TiffStreamReader(byte[] data, int startIndex, int dataLength)
public TiffStreamReader(byte[] data, int startIndex, int dataLength)
初始化 TiffStreamReader 类的新实例。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 数据 | byte[] | 字节数组数据。 |
| startIndex | int | data 的起始索引。 |
| dataLength | int | 数据的长度。 |
TiffStreamReader(StreamContainer streamContainer)
public TiffStreamReader(StreamContainer streamContainer)
初始化 TiffStreamReader 类的新实例。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| streamContainer | StreamContainer | 流容器。 |
getLength()
public long getLength()
获取读取器的长度。
值:读取器长度。
Returns: long
getThrowExceptions()
public boolean getThrowExceptions()
获取或设置一个值,指示在不正确的数据处理(读取或写入流)时是否抛出异常。
值:如果在错误的数据处理时抛出异常则为 true;否则,错误条件将被静默忽略。
Returns: boolean
setThrowExceptions(boolean value)
public void setThrowExceptions(boolean value)
获取或设置一个值,指示在不正确的数据处理(读取或写入流)时是否抛出异常。
值:如果在错误的数据处理时抛出异常则为 true;否则,错误条件将被静默忽略。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| value | boolean |
readBytes(byte[] array, int arrayIndex, long position, long count)
public long readBytes(byte[] array, int arrayIndex, long position, long count)
从流中读取字节值数组。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| 数组 | byte[] | 要填充的数组。 |
| arrayIndex | int | 开始放置值的数组索引。 |
| position | long | 要读取的流位置。 |
| count | long | 要读取的元素数量。 |
Returns: long - 字节值数组。
readBytes(long position, long count)
public byte[] readBytes(long position, long count)
从流中读取无符号字节值数组。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| position | long | 要读取的位置。 |
| count | long | 元素计数。 |
Returns: byte[] - 无符号字节值数组。
readDouble(long position)
public double readDouble(long position)
从流中读取单个 double 值。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| position | long | 要读取的位置。 |
Returns: double - 单个 double 值。
readDoubleArray(long position, long count)
public double[] readDoubleArray(long position, long count)
从流中读取 double 值数组。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| position | long | 要读取的位置。 |
| count | long | 元素计数。 |
Returns: double[] - double 值数组。
readFloat(long position)
public float readFloat(long position)
从流中读取单个 float 值。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| position | long | 要读取的位置。 |
Returns: float - 单个 float 值。
readFloatArray(long position, long count)
public float[] readFloatArray(long position, long count)
从流中读取 float 值数组。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| position | long | 要读取的位置。 |
| count | long | 元素计数。 |
Returns: float[] - float 值数组。
readRational(long position)
public TiffRational readRational(long position)
从流中读取单个有理数值。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| position | long | 要读取的位置。 |
Returns: TiffRational - The rational number.
readSRational(long position)
public TiffSRational readSRational(long position)
从流中读取单个有符号有理数值。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| position | long | 要读取的位置。 |
Returns: TiffSRational - The signed rational number.
readRationalArray(long position, long count)
public TiffRational[] readRationalArray(long position, long count)
从流中读取有理数值数组。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| position | long | 要读取的位置。 |
| count | long | 元素计数。 |
Returns: com.aspose.imaging.fileformats.tiff.TiffRational[] - 有理数值数组。
readSRationalArray(long position, long count)
public TiffSRational[] readSRationalArray(long position, long count)
从流中读取有符号有理数值数组。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| position | long | 要读取的位置。 |
| count | long | 元素计数。 |
Returns: com.aspose.imaging.fileformats.tiff.TiffSRational[] - 有符号有理数值数组。
readSByte(long position)
public byte readSByte(long position)
从流中读取有符号字节数据。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| position | long | 要读取的位置。 |
Returns: byte - 有符号字节值。
readSByteArray(long position, long count)
public byte[] readSByteArray(long position, long count)
从流中读取有符号字节值数组。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| position | long | 要读取的位置。 |
| count | long | 元素计数。 |
Returns: byte[] - 有符号字节值数组。
readSInt(long position)
public int readSInt(long position)
从流中读取有符号整数值。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| position | long | 要读取的位置。 |
Returns: int - 有符号整数值。
readSIntArray(long position, long count)
public int[] readSIntArray(long position, long count)
从流中读取有符号整数值数组。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| position | long | 要读取的位置。 |
| count | long | 元素计数。 |
Returns: int[] - 有符号整数值数组。
readSShort(long position)
public short readSShort(long position)
从流中读取有符号短整数值。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| position | long | 要读取的位置。 |
Returns: short - 有符号 short 值。
readSShortArray(long position, long count)
public short[] readSShortArray(long position, long count)
从流中读取有符号短整数值数组。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| position | long | 要读取的位置。 |
| count | long | 元素计数。 |
Returns: short[] - 有符号 short 值数组。
readUInt(long position)
public long readUInt(long position)
从流中读取无符号整数值。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| position | long | 要读取的位置。 |
Returns: long - 无符号整数值。
readUIntArray(long position, long count)
public long[] readUIntArray(long position, long count)
从流中读取无符号整数值数组。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| position | long | 要读取的位置。 |
| count | long | 元素计数。 |
Returns: long[] - 无符号整数值数组。
readUShort(long position)
public int readUShort(long position)
从流中读取无符号短整数值。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| position | long | 要读取的位置。 |
Returns: int - 一个无符号短整数值。
readUShortArray(long position, long count)
public int[] readUShortArray(long position, long count)
从流中读取无符号整数值数组。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| position | long | 要读取的位置。 |
| count | long | 元素计数。 |
Returns: int[] - 无符号整数值的数组。
readLong(long position)
public final long readLong(long position)
从流中读取无符号长整数值。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| position | long | 要读取的位置。 |
Returns: long - 一个无符号短整数值。
readLongArray(long position, long count)
public final long[] readLongArray(long position, long count)
从流中读取长整数值数组。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| position | long | 要读取的位置。 |
| count | long | 元素计数。 |
Returns: long[] - ulong 数组。
readULong(long position)
public final long readULong(long position)
从流中读取无符号长整数值。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| position | long | 要读取的位置。 |
Returns: long - 一个无符号短整数值。
readULongArray(long position, long count)
public final long[] readULongArray(long position, long count)
从流中读取无符号长整数值数组。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| position | long | 要读取的位置。 |
| count | long | 元素计数。 |
Returns: long[] - ulong 数组。
toStreamContainer(long startPosition)
public StreamContainer toStreamContainer(long startPosition)
将底层数据转换为流容器。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| startPosition | long | 用于开始转换的起始位置。 |
Returns:
StreamContainer - The StreamContainer with converted data.