E57 Foundation API v1.1.312  Aug. 10, 2011
void read ( uint8_t *  buf,
int64_t  start,
size_t  count 
)

Read a buffer of bytes from a blob.

Parameters:
[in]bufA memory buffer to store bytes read from the blob.
[in]startThe index of the first byte in blob to read.
[in]countThe number of bytes to read.

The memory buffer buf must be able to store at least count bytes. The data is stored in a binary section of the ImageFile with checksum protection, so undetected corruption is very unlikely. It is an error to attempt to read outside the declared size of the Blob. The format of the data read is opaque (unspecified by the ASTM E57 data format standard). Since buf is a byte buffer, byte ordering is irrelevant (it will come out in the same order that it went in). There is no constraint on the ordering of reads. Any part of the Blob data can be read zero or more times.

Precondition:
The destination ImageFile must be open (i.e. destImageFile().isOpen()).
buf != NULL
0 <= start < byteCount()
0 <= count
(start + count) < byteCount()
Exceptions:
E57_ERROR_BAD_API_ARGUMENT
E57_ERROR_IMAGEFILE_NOT_OPEN
E57_ERROR_LSEEK_FAILED
E57_ERROR_READ_FAILED
E57_ERROR_BAD_CHECKSUM
E57_ERROR_INTERNALAll objects in undocumented state
See also:
BlobCreate.cpp example, BlobNode::byteCount, BlobNode::write
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines