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 - Create binary data block from base 16 string
- fromBase64 - Create binary data block from base 64 string
- fromInstance - Copy binary data from instance
- fromQuotedPrintable - Create binary data block from quoted printable string
- 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 - Assign binary data block
- isNull - 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+ - Concatenates two binary data blocks.
- operator+= - Append binary data
- operator< - Compare for less
- 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 - Write binary data to file
- toBase16 - Create base 16 (hexadecimal) string from binary data block
- toBase64 - Create base 64 string from binary data block
- toInstance - Copy binary data to instance
- toQuotedPrintable - Create quoted printable string from binary data block
- toString - - internal feature (not documented)
- truncate - Truncate a binary data block at the given position index
- update - Update binary data block
- ~Binary - Destructor