• 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
Size limit of NSData or NSFileHandle?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Size limit of NSData or NSFileHandle?


  • Subject: Size limit of NSData or NSFileHandle?
  • From: Ivan Kourtev <email@hidden>
  • Date: Sun, 9 Apr 2006 16:33:41 -0400

Hi,

Is anyone aware of a size limit in NSData (I am aware of the supposed 2GB size limit of NSData according to the docs) or NSFileHandle?

I am using the - [NSFileHandle availableData] method to get all the data of a file in one NSData object. But it seems that the maximum amount of data I'll get back is 268,435,456 bytes -- it happens to be precisely 2^28, by the way. I tried both (A) NSData *fileData = [inFile availableData]; and (B) NSData *fileData = [inFile readDataOfLength:fileSize]; but no luck either way.

I use this way of reading the entire file contents at once for many files, and for the first time today noticed that it broke on a very large file of about 310 MB in size.

I see no exceptions being raised. Is this a bug, or is someone aware of this behavior? Couldn't find any information on this...

Thanks,

-- ivan
_______________________________________________
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


  • Follow-Ups:
    • Re: Size limit of NSData or NSFileHandle?
      • From: Greg Herlihy <email@hidden>
    • Re: Size limit of NSData or NSFileHandle?
      • From: Christian Stieber <email@hidden>
  • Prev by Date: Re: Newbie Question about using selected file name with fopen
  • Next by Date: Re: Newbie Question about using selected file name with fopen
  • Previous by thread: Re: Is KVO disabled during observeValueForKeyPath?
  • Next by thread: Re: Size limit of NSData or NSFileHandle?
  • Index(es):
    • Date
    • Thread