• 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
When does NSInputStream's -getBuffer:length: actually work?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

When does NSInputStream's -getBuffer:length: actually work?


  • Subject: When does NSInputStream's -getBuffer:length: actually work?
  • From: Jens Alfke <email@hidden>
  • Date: Wed, 25 Jul 2012 10:08:32 -0700

NSInputStream has a -getBuffer:length: method that lets you get the available data from the stream without copying. This is great for performance, and I've written my client code to take advantage of it if it's supported, but every time I've tested, it isn't supported (i.e. just returns NO) so my code just falls back to calling -read:maxLength: instead.

Does anyone know in what circumstances, or in what types of streams, this method actually works?

—Jens
_______________________________________________

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


  • Follow-Ups:
    • Re: When does NSInputStream's -getBuffer:length: actually work?
      • From: Andreas Grosam <email@hidden>
    • Re: When does NSInputStream's -getBuffer:length: actually work?
      • From: Wim Lewis <email@hidden>
    • Re: When does NSInputStream's -getBuffer:length: actually work?
      • From: Thomas Davie <email@hidden>
  • Prev by Date: RE: PDF Rendering on iPad's
  • Next by Date: What's the build number of 10.8?
  • Previous by thread: RE: PDF Rendering on iPad's
  • Next by thread: Re: When does NSInputStream's -getBuffer:length: actually work?
  • Index(es):
    • Date
    • Thread