company logo

BinaryFile :: read - Read number of bytes from file

The function allows reading a number of bytes from binary file into a binary buffer. The binary buffer containing the read data is returned to the caller.

Return value:  Binary data block handle ( odaba::Binary  )

Binary data block handle, which may contain binary data up to 2 GB.

Implementation details

odaba::Binary BinaryFile  :: read ( int32 iLength )

The function allows reading a number of bytes from binary file. The function reads the next block of iLength bytes into the binary buffer returned to the caller. When 0 has been passed in iLength, the remaining part or the complete file will be read.

When end of file has been reached, the length of binary buffer returned is 0 or less the the requested size (iLength). When an error occurred while reading the file, the function throws an error. For more details, one may browse the error log.

  • iLength - Length

    The length is the size allocated for an instance or area.