Deprecated NSData Methods

A method identified as deprecated has been superseded and may become unsupported in the future.

Deprecated in Mac OS X v10.6

getBytes:

Copies a data object’s contents into a given buffer. (Deprecated in Mac OS X v10.6. This method is unsafe because it could potentially cause buffer overruns. You should use getBytes:length: or getBytes:range: instead.)

- (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.

Availability
See Also
Related Sample Code
Declared In
NSData.h


© 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-10-13)