Size limit of NSData or NSFileHandle?
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