TiffStreamReader

Inheritance: java.lang.Object, com.aspose.fileformats.fileformats.tiff.filemanagement.TiffStreamSeeker

public class TiffStreamReader extends TiffStreamSeeker

The tiff stream for handling little endian tiff file format.

Constructors

ConstructorDescription
TiffStreamReader(byte[] data)Initializes a new instance of the TiffStreamReader class.
TiffStreamReader(byte[] data, int startIndex)Initializes a new instance of the TiffStreamReader class.
TiffStreamReader(byte[] data, int startIndex, int dataLength)Initializes a new instance of the TiffStreamReader class.
TiffStreamReader(StreamContainer streamContainer)Initializes a new instance of the TiffStreamReader class.

Methods

MethodDescription
getLength()Gets the reader length.
getThrowExceptions()Gets or sets a value indicating whether exceptions are thrown on incorrect data processing (reading or writing to stream).
setThrowExceptions(boolean value)Gets or sets a value indicating whether exceptions are thrown on incorrect data processing (reading or writing to stream).
readBytes(byte[] array, int arrayIndex, long position, long count)Reads an array of byte values from the stream.
readBytes(long position, long count)Reads an array of unsigned byte values from the stream.
readDouble(long position)Read a single double value from the stream.
readDoubleArray(long position, long count)Reads an array of double values from the stream.
readFloat(long position)Read a single float value from the stream.
readFloatArray(long position, long count)Reads an array of float values from the stream.
readRational(long position)Read a single rational number value from the stream.
readSRational(long position)Read a single signed rational number value from the stream.
readRationalArray(long position, long count)Reads an array of rational values from the stream.
readSRationalArray(long position, long count)Reads an array of signed rational values from the stream.
readSByte(long position)Reads signed byte data from the stream.
readSByteArray(long position, long count)Reads an array of signed byte values from the stream.
readSInt(long position)Read signed integer value from the stream.
readSIntArray(long position, long count)Reads an array of signed integer values from the stream.
readSShort(long position)Read signed short value from the stream.
readSShortArray(long position, long count)Reads an array of signed short values from the stream.
readUInt(long position)Read unsigned integer value from the stream.
readUIntArray(long position, long count)Reads an array of unsigned integer values from the stream.
readUShort(long position)Read unsigned short value from the stream.
readUShortArray(long position, long count)Reads an array of unsigned integer values from the stream.
readLong(long position)Read unsigned long value from the stream.
readLongArray(long position, long count)Reads an array of ulong values from the stream.
readULong(long position)Read unsigned long value from the stream.
readULongArray(long position, long count)Reads an array of ulong values from the stream.
toStreamContainer(long startPosition)Converts the underlying data to the stream container.

TiffStreamReader(byte[] data)

public TiffStreamReader(byte[] data)

Initializes a new instance of the TiffStreamReader class.

Parameters:

ParameterTypeDescription
databyte[]The byte array data.

TiffStreamReader(byte[] data, int startIndex)

public TiffStreamReader(byte[] data, int startIndex)

Initializes a new instance of the TiffStreamReader class.

Parameters:

ParameterTypeDescription
databyte[]The byte array data.
startIndexintThe start index into data.

TiffStreamReader(byte[] data, int startIndex, int dataLength)

public TiffStreamReader(byte[] data, int startIndex, int dataLength)

Initializes a new instance of the TiffStreamReader class.

Parameters:

ParameterTypeDescription
databyte[]The byte array data.
startIndexintThe start index into data.
dataLengthintLength of the data.

TiffStreamReader(StreamContainer streamContainer)

public TiffStreamReader(StreamContainer streamContainer)

Initializes a new instance of the TiffStreamReader class.

Parameters:

ParameterTypeDescription
streamContainerStreamContainerThe stream container.

getLength()

public long getLength()

Gets the reader length.

Value: The reader length.

Returns: long

getThrowExceptions()

public boolean getThrowExceptions()

Gets or sets a value indicating whether exceptions are thrown on incorrect data processing (reading or writing to stream).

Value: true if exceptions are thrown on incorrect data processing; otherwise, the error conditions are silently ignored.

Returns: boolean

setThrowExceptions(boolean value)

public void setThrowExceptions(boolean value)

Gets or sets a value indicating whether exceptions are thrown on incorrect data processing (reading or writing to stream).

Value: true if exceptions are thrown on incorrect data processing; otherwise, the error conditions are silently ignored.

Parameters:

ParameterTypeDescription
valueboolean

readBytes(byte[] array, int arrayIndex, long position, long count)

public long readBytes(byte[] array, int arrayIndex, long position, long count)

Reads an array of byte values from the stream.

Parameters:

ParameterTypeDescription
arraybyte[]The array to fill.
arrayIndexintThe array index to start putting values to.
positionlongThe stream position to read from.
countlongThe elements count to read.

Returns: long - The array of byte values.

readBytes(long position, long count)

public byte[] readBytes(long position, long count)

Reads an array of unsigned byte values from the stream.

Parameters:

ParameterTypeDescription
positionlongThe position to read from.
countlongThe elements count.

Returns: byte[] - The array of unsigned byte values.

readDouble(long position)

public double readDouble(long position)

Read a single double value from the stream.

Parameters:

ParameterTypeDescription
positionlongThe position to read from.

Returns: double - The single double value.

readDoubleArray(long position, long count)

public double[] readDoubleArray(long position, long count)

Reads an array of double values from the stream.

Parameters:

ParameterTypeDescription
positionlongThe position to read from.
countlongThe elements count.

Returns: double[] - The array of double values.

readFloat(long position)

public float readFloat(long position)

Read a single float value from the stream.

Parameters:

ParameterTypeDescription
positionlongThe position to read from.

Returns: float - The single float value.

readFloatArray(long position, long count)

public float[] readFloatArray(long position, long count)

Reads an array of float values from the stream.

Parameters:

ParameterTypeDescription
positionlongThe position to read from.
countlongThe elements count.

Returns: float[] - The array of float values.

readRational(long position)

public TiffRational readRational(long position)

Read a single rational number value from the stream.

Parameters:

ParameterTypeDescription
positionlongThe position to read from.

Returns: TiffRational - The rational number.

readSRational(long position)

public TiffSRational readSRational(long position)

Read a single signed rational number value from the stream.

Parameters:

ParameterTypeDescription
positionlongThe position to read from.

Returns: TiffSRational - The signed rational number.

readRationalArray(long position, long count)

public TiffRational[] readRationalArray(long position, long count)

Reads an array of rational values from the stream.

Parameters:

ParameterTypeDescription
positionlongThe position to read from.
countlongThe elements count.

Returns: com.aspose.imaging.fileformats.tiff.TiffRational[] - The array of rational values.

readSRationalArray(long position, long count)

public TiffSRational[] readSRationalArray(long position, long count)

Reads an array of signed rational values from the stream.

Parameters:

ParameterTypeDescription
positionlongThe position to read from.
countlongThe elements count.

Returns: com.aspose.imaging.fileformats.tiff.TiffSRational[] - The array of signed rational values.

readSByte(long position)

public byte readSByte(long position)

Reads signed byte data from the stream.

Parameters:

ParameterTypeDescription
positionlongThe position to read from.

Returns: byte - The signed byte value.

readSByteArray(long position, long count)

public byte[] readSByteArray(long position, long count)

Reads an array of signed byte values from the stream.

Parameters:

ParameterTypeDescription
positionlongThe position to read from.
countlongThe elements count.

Returns: byte[] - The array of signed byte values.

readSInt(long position)

public int readSInt(long position)

Read signed integer value from the stream.

Parameters:

ParameterTypeDescription
positionlongThe position to read from.

Returns: int - A signed integer value.

readSIntArray(long position, long count)

public int[] readSIntArray(long position, long count)

Reads an array of signed integer values from the stream.

Parameters:

ParameterTypeDescription
positionlongThe position to read from.
countlongThe elements count.

Returns: int[] - The array of signed integer values.

readSShort(long position)

public short readSShort(long position)

Read signed short value from the stream.

Parameters:

ParameterTypeDescription
positionlongThe position to read from.

Returns: short - A signed short value.

readSShortArray(long position, long count)

public short[] readSShortArray(long position, long count)

Reads an array of signed short values from the stream.

Parameters:

ParameterTypeDescription
positionlongThe position to read from.
countlongThe elements count.

Returns: short[] - The array of signed short values.

readUInt(long position)

public long readUInt(long position)

Read unsigned integer value from the stream.

Parameters:

ParameterTypeDescription
positionlongThe position to read from.

Returns: long - An unsigned integer value.

readUIntArray(long position, long count)

public long[] readUIntArray(long position, long count)

Reads an array of unsigned integer values from the stream.

Parameters:

ParameterTypeDescription
positionlongThe position to read from.
countlongThe elements count.

Returns: long[] - The array of unsigned integer values.

readUShort(long position)

public int readUShort(long position)

Read unsigned short value from the stream.

Parameters:

ParameterTypeDescription
positionlongThe position to read from.

Returns: int - An unsigned short value.

readUShortArray(long position, long count)

public int[] readUShortArray(long position, long count)

Reads an array of unsigned integer values from the stream.

Parameters:

ParameterTypeDescription
positionlongThe position to read from.
countlongThe elements count.

Returns: int[] - The array of unsigned integer values.

readLong(long position)

public final long readLong(long position)

Read unsigned long value from the stream.

Parameters:

ParameterTypeDescription
positionlongThe position to read from.

Returns: long - An unsigned short value.

readLongArray(long position, long count)

public final long[] readLongArray(long position, long count)

Reads an array of ulong values from the stream.

Parameters:

ParameterTypeDescription
positionlongThe position to read from.
countlongThe elements count.

Returns: long[] - The ulong array.

readULong(long position)

public final long readULong(long position)

Read unsigned long value from the stream.

Parameters:

ParameterTypeDescription
positionlongThe position to read from.

Returns: long - An unsigned short value.

readULongArray(long position, long count)

public final long[] readULongArray(long position, long count)

Reads an array of ulong values from the stream.

Parameters:

ParameterTypeDescription
positionlongThe position to read from.
countlongThe elements count.

Returns: long[] - The ulong array.

toStreamContainer(long startPosition)

public StreamContainer toStreamContainer(long startPosition)

Converts the underlying data to the stream container.

Parameters:

ParameterTypeDescription
startPositionlongThe start position to start conversion from.

Returns: StreamContainer - The StreamContainer with converted data.