On 25 Jul 2012, at 18:08, Jens Alfke wrote: > 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?
I don't know for sure, but I would bet it's streams reading from files, which have become memory mapped. Bob _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com