readInto:startingAt:length:error:
Synchronously reads data from the resource into a buffer.
Declaration
- (size_t) readInto:(void *) buffer startingAt:(off_t) offset length:(size_t) length error:(NSError **) error;Parameters
- buffer:
A buffer to receive the data.
- offset:
The offset into the resource from which to start reading.
- length:
A maximum number of bytes to read. The method’s return value contains the actual number of bytes read.
- error:
On return, any error encountered while reading data, or
nilif no error occurred.
Return Value
The actual number of bytes read.
Discussion
This is a synchronous version of readInto:startingAt:length:completionHandler:.