Instance Method

getBytes:

Copies a data object’s contents into a given buffer.

Declaration

- (void)getBytes:(void *)buffer;

Parameters

buffer

A buffer into which to copy the receiver's data. The buffer must be at least length bytes.

Discussion

You can see a sample using this method in Working With Binary Data.

See Also

Accessing Underlying Bytes

bytes

A pointer to the data object's contents.

- enumerateByteRangesUsingBlock:

Enumerates each range of bytes in the data object using a block.

- getBytes:length:

Copies a number of bytes from the start of the data object into a given buffer.

- getBytes:range:

Copies a range of bytes from the data object into a given buffer.