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().
- 1. Administration - Administration functions
- 2. Access - Access functions
- 2.1. Conversion - Binary conversion
- 2.2. Operation - Binary data block operations
- 2.3. Compare - Compare functions
- Binary - Constructor
- append - Append binary data
- area - Returns the pointer to the binary data block area
- assign - Assign binary data block
- checkSum - Create simple check sum
- chop - Remove count bytes from the end
- clear - Clear binary data block
- compare - Compare two binary data blocks
- concat - Concatenates two specified binary data blocks.
- erase - Erase bytes from data block
- fromBase16 - Convert base 16 character string data to binary
- fromBase64 - Convert base 64 character string data to binary
- fromInstance - Copy binary data from instance
- fromQuotedPrintable - Convert quoted printable string to binary data block
- index - Get byte value at position
- indexOf - Position in binary area
- insert - Insert data into binary data block
- isEmpty - Is binary data block empty
- isEqual - Check binary data blocks to be identical
- isNull - No binary data block allocated
- left - Get leftmost bytes of binary data block
- length - Get length of binary data block
- loadFile - Load data from file
- mid - Get data section from binary data block
- operator!= - Are binary data different
- operator+ - Concatenate binary data blocks
- operator+= - Append binary data
- operator< - Compare binary data blocks
- operator<= - Compare for less or equal
- operator= - Assign binary data block
- operator== - Check binary data blocks to be identical
- operator> - Compare for greater
- operator>= - Compare for greater or equal
- right - Get rightmost bytes of binary data block
- storeFile - Store binary data to file
- toBase16 - Convert binary data to a base 16 character string
- toBase64 - Convert binary data to a base 64 character string
- toInstance - Copy binary data to instance
- toQuotedPrintable - Convert binary data block to a quoted printable string
- toString - Convert binary data to string
- truncate - Truncate a binary data block
- update - Update binary data block
- ~Binary - Destructor

