db_len_t db::BlobField::read ( db_len_t  pos,
void *  buf,
db_len_t  len 
)

Read an array of bytes from a BLOB (Binary Large OBject) field.

Because BLOBs can be arbitrarily large they must be read from in discrete sections. The byte array given by buf will be filled starting from the pos position of the BLOB field.

Parameters:
pos The offset into the BLOB where buf will be read.
buf The byte array which will be read into from the BLOB.
len The length of buf in bytes.
Returns:
amount of data read from BLOB in bytes when successful, otherwise:
  • DB_EINVAL if buf is NULL but len is positive.
Precondition:
The table must be in DB_TABLE_BROWSING mode.
See also:
BlobField::write, BlobField::write_final, BlobField::size, BlobField::truncate


Copyright © 2005-2008 ITTIA®. All rights reserved.