Back to Adaptive Vision Studio website

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


Reads boolean value in specified binary format from byte buffer.

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


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.


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.