company logo

Binary - Binary data block handle

Binary data blocks are used for reading and writing binary data from/to database or files. Binary data blocks are, usually, not managed by the application but referred to as a whole. Hence, the class provides limited support, only, for manipulating binary data within the block. Extended support is provided for reading and writing binary data blocks and for different kinds on string conversion.

In order to perform more specific operations, one may also obtain the data block pointer and the data block size (C++ only). Typically, binary data is passed completely in one block. In case of very large data blocks, one may also split binary data into a number of data blocks.

Mainly, binary data blocks are used for accessing BLOB values stored in the database. In order to manipulate BLOB values, binary data has to be provided in a binary data block. Communication between database and application always goes through a Binary object instance.

The class allows updating single bytes or sections within a binary data block (update()), extending data in a data block (append()) or inserting (insert()) and removing (remove()) data. Moreover, one may convert binary data into string data (base 64, hexadecimal - base 16 or quoted printable) and reverse (to...() and from...() functions).

Finally, the class supports reading and writing binary data from and to files (loadFile(), storeFile()).

Manipulated binary data may be stored to the database by passing the binary data block to Value::write().

Attributes
    Function Groups
    Functions