• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSMutableData short comings?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >NSMutableData short comings? (From: Greg <email@hidden>)

  • Prev by Date: Re: how to retrieve non-string resources in cocoa
  • Next by Date: Re: Core Data and undo action names
  • Previous by thread: Re: NSMutableData short comings?
  • Next by thread: Inserting a method call into main thread.... how do I do it?
  • Index(es):
    • Date
    • Thread