Re: NSData. add 6 bytes to NSData
Re: NSData. add 6 bytes to NSData
- Subject: Re: NSData. add 6 bytes to NSData
- From: Peter Mulholland <email@hidden>
- Date: Sat, 4 Jul 2009 13:02:40 +0100
Hello Carlo,
Saturday, July 4, 2009, 12:47:31 PM, you wrote:
> Hi, everybody, I need to add 6 bytes to my NSData
> steps:
> 1. write into NSData
> NSData *data = [NSData dataWithBytes:(const char*)&packet length:sizeof(packet)];
> 2. read from NSData
> 3. In loop i need to add 6 bytes
> 4. And again wtite into NSData
> first step i did, and from 2 to 4 i dont know how to do. Anybody could help me? Thanks in advance!
You can't. Use NSMutableData instead.
--
Best regards,
Peter mailto:email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden