FROM : Pontus Ilbring
DATE : Sun Dec 19 14:22:29 2004
On 2004-12-19, at 13.03, Peter Karlsson wrote:
> Dear list!
>
> How do I copy the contents of a buffer (made with malloc) into a NSData
> object?
If you mean copy into an existing NSData object then the answer is that
you don't. NSData is immutable.
If you mean create a new NSData object with data from a buffer then try
initWithBytes:length:
DATE : Sun Dec 19 14:22:29 2004
On 2004-12-19, at 13.03, Peter Karlsson wrote:
> Dear list!
>
> How do I copy the contents of a buffer (made with malloc) into a NSData
> object?
If you mean copy into an existing NSData object then the answer is that
you don't. NSData is immutable.
If you mean create a new NSData object with data from a buffer then try
initWithBytes:length:
| Related mails | Author | Date |
|---|---|---|
| Peter Karlsson | Dec 19, 13:03 | |
| ??? a.k.a. James C… | Dec 19, 14:03 | |
| Pontus Ilbring | Dec 19, 14:22 | |
| The Karl Adam | Dec 20, 02:03 | |
| Clark Cox | Dec 20, 03:40 |






Cocoa mail archive

