BinaryStream.ReadInt16

From Xojo Documentation

Method

BinaryStream.ReadInt16() As Int16

New in 2005r5

Supported for all project types and targets.

Reads a two-byte value from the stream and returns it as an Int16.

Notes

If you read over the end of the stream you get zero returned from this method. No error and no exception. If you need to test for this error, you can check the EndOfFile, BytePosition, and Length properties.

Sample Code

Var i As Int16
Var readStream As BinaryStream = BinaryStream.Open(readFile, False)
i = readStream.ReadInt16