Back to Aurora Vision Studio website

You are here: Start » Filter Reference » System » Binary Data » ReadBoolFromBuffer

ReadBoolFromBuffer


Module: FoundationLite

Reads boolean value in specified binary format from byte buffer.

Name Type Range Description
Input value inBuffer ByteBuffer Source data
Input value inOffset Integer 0 - Read start position
Input value inFormat IntegerBinaryFormat Binary serialization format of integer data
Output value outValue Bool Read value
Output value outOffset Integer Resulting position behind read data

Description

This filter is intended for reading (deserializing) a boolean value out of a raw binary data in a ByteBuffer.

Data is read starting at the position provided by the inOffset input (in bytes). This position is than advanced by the size of read data and returned on the outOffset output. This output can be connected to the inOffset input of other byte buffer reading filter when reading consecutive fields of data structures. When data read spans beyond the end of the input buffer an IOError is raised.

A boolean value is actually stored as an integer data with contractual numeric value representing True and False. This filter is reading an integer numeric value similarly to the ReadIntegerFromBuffer filter and returns False on the outValue output when this value is equal to zero, and respectively True when this value is different than zero.

Errors

This filter can throw an exception to report error. Read how to deal with errors in Error Handling.

List of possible exceptions:

Error type Description
DomainError Not supported integer binary format.
IoError Empty byte buffer at input of ReadBoolFromBuffer.
IoError Reading beyond the end of the byte buffer.
Source data range specified by the inOffset input and the size of integer binary format spans beyond the end of the byte buffer.

Complexity Level

This filter is available on Basic Complexity Level.

Filter Group

This filter is member of ReadFromBuffer filter group.

See Also

  • WriteBoolToBuffer – Converts boolean value into specified integer binary representation and writes it to a byte buffer.