dataWithBytes:length:
Creates a data object containing a given number of bytes copied from a given buffer.
Declaration
+ (instancetype) dataWithBytes:(const void *) bytes length:(NSUInteger) length;Parameters
- bytes:
A buffer containing data for the new object.
- length:
The number of bytes to copy from
bytes. This value must not exceed the length ofbytes.