TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

interface IBinaryReader in Tinman.Core.IO

Base interface for classes that sequentially read data from a binary stream.

interface IBinaryReader base of IDataStream
  ISerializer

Methods

Read

Reads a number of bytes from the stream.

method Read (ByteBuffer bytes)
type int32
params bytes [not-null] The buffer where the read bytes will be stored.
returns [>=0] The number of bytes the have been read.

Remarks:

The number of bytes that are read from the stream may be less than the number of Remaining bytes in the given ByteBuffer, for any arbitrary reason.

Exceptions:

ReadAll

Reads a number of bytes from the stream.

method ReadAll (ByteBuffer bytes)
params bytes [not-null] The buffer where the read bytes will be stored.

Remarks:

The number of bytes that are read from the stream will be equal to the number of Remaining bytes in the given ByteBuffer.

Exceptions:

ReadFloat32

Reads a 32-bit floating point value from the data stream.

method ReadFloat32 ()
type float32
returns The read value.

Exceptions:

ReadFloat32s

Reads 32-bit floating point values from the data stream.

method ReadFloat32s (float32[] array, int32 offset, int32 count)
params array [not-null] The output array.
  offset [>=0] Index of first array element to write.
  count [>=0] Number of values to read.
returns The read value.

Exceptions:

ReadFloat64

Reads a 64-bit floating point value from the data stream.

method ReadFloat64 ()
type float64
returns The read value.

Exceptions:

ReadFloat64s

Reads 64-bit floating point values from the data stream.

method ReadFloat64s (float64[] array, int32 offset, int32 count)
params array [not-null] The output array.
  offset [>=0] Index of first array element to write.
  count [>=0] Number of values to read.
returns The read value.

Exceptions:

ReadInt16

Reads a signed 16-bit integer value from the data stream using.

method ReadInt16 ()
type int16
returns The read value.

Exceptions:

ReadInt16s

Reads signed 16-bit integer value values from the data stream.

method ReadInt16s (int16[] array, int32 offset, int32 count)
params array [not-null] The output array.
  offset [>=0] Index of first array element to write.
  count [>=0] Number of values to read.
returns The read value.

Exceptions:

ReadInt32

Reads a signed 32-bit integer value from the data stream.

method ReadInt32 ()
type int32
returns The read value.

Exceptions:

ReadInt32s

Reads signed 32-bit integer value values from the data stream.

method ReadInt32s (int32[] array, int32 offset, int32 count)
params array [not-null] The output array.
  offset [>=0] Index of first array element to write.
  count [>=0] Number of values to read.
returns The read value.

Exceptions:

ReadInt64

Reads a signed 64-bit integer value from the data stream.

method ReadInt64 ()
type int64
returns The read value.

Exceptions:

ReadInt64s

Reads signed 64-bit integer value values from the data stream.

method ReadInt64s (int64[] array, int32 offset, int32 count)
params array [not-null] The output array.
  offset [>=0] Index of first array element to write.
  count [>=0] Number of values to read.
returns The read value.

Exceptions:

ReadInt8

Reads an 8-bit value from the stream.

method ReadInt8 ()
type int8
returns The read value.

Exceptions:

ReadInt8s

Reads signed 8-bit integer value values from the data stream.

method ReadInt8s (int8[] array, int32 offset, int32 count)
params array [not-null] The output array.
  offset [>=0] Index of first array element to write.
  count [>=0] Number of values to read.
returns The read value.

Exceptions:

ReadUInt16

Reads an unsigned 16-bit integer value from the data stream.

method ReadUInt16 ()
type int32
returns The read value.

Exceptions:

ReadUInt32

Reads an unsigned 32-bit integer value from the data stream.

method ReadUInt32 ()
type int64
returns The read value.

Exceptions:

ReadUInt8

Reads an unsigned 8-bit integer from the data stream.

method ReadUInt8 ()
type int32
returns The read value.

Exceptions:

TryReadUInt8

Reads an unsigned 8-bit value from the stream.

method TryReadUInt8 ()
type int32
returns [-1..255] The unsigned 8-bit value or -1 if the end of the stream has been reached.

Extensions

ReadEof

Reads a number of bytes from the stream.

method ReadEof (ByteBuffer bytes)
type int32
params bytes [not-null] The buffer where the read bytes will be stored.
returns [>=0] The number of bytes that have been read into bytes. A value of 0 indicates that the end of file has been reached (assuming bytes had at least one remaining byte).

Remarks:

The number of bytes that are read from the stream will be equal to the number of Remaining bytes in the given ByteBuffer, except when the end of file is reached (the returned value will be smaller in this case).

Exceptions: