BinaryStream.ReadBoolean

From Xojo Documentation

Method

BinaryStream.ReadBoolean() As Boolean

Supported for all project types and targets.

Reads a Boolean value from the stream and returns it as a Boolean.

Notes

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

Sample code

The following code reads the next value from the BinaryStream as a Boolean.

Var b As Boolean
Var readStream As BinaryStream = BinaryStream.Open(readFile, False)
.
.
b = readStream.ReadBoolean