Re: NSMutableData short comings?
Re: NSMutableData short comings?
- Subject: Re: NSMutableData short comings?
- From: Mark Ackerman <email@hidden>
- Date: Tue, 23 Aug 2005 08:08:37 -0400
Greg,
To remove the "popped off" data, without creating a new mutable data
object, would NSMutableData's setLength: method do the trick?
Mark
On Aug 23, 2005, at 2:07 AM, Greg wrote:
Hi,
I was looking at NSMutableData to use as a buffer when using a
stream. When there is enough data in the buffer to create a full
packet, I was going to pop off the range of data to construct the
packet. Is there any reason why NSMutableData does not have a
method - (void)removeDataInRange:(NSRange)range; ? Is there much
overhead in splitting the data into two bits, the complete packet
and the rest of the buffer and creating a new mutable data object
with the left overs?
If there is no logical reason why a method like this doesn't exist,
I will file a bug on friday.
Greg
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40earthlink.net
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden