Re: Need help parsing a large text file one line at a time
Re: Need help parsing a large text file one line at a time
- Subject: Re: Need help parsing a large text file one line at a time
- From: Jeff LaMarche <email@hidden>
- Date: Mon, 09 Jun 2008 16:38:37 -0700
On Jun 9, 2008, at 2:04 PM, Abel J. Almeida wrote:
I need help parsing a large text file.
I need to examine the file one line at a time.
It's a 128MB text file.
I used the stringWithContentsOfFile method from the NSString class,
but the file is too large and it doesn't seem very optimized to me,
because what I need is parse one line at a time not the entire text
file._______________________________________________
Check out NSFileHandle - it should handle what you need. It won't be
quite a simple as using the NSString convenience class, but it's not
hard:
http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSFileHandle_Class/Reference/Reference.html#/
/apple_ref/doc/uid/20000304
_______________________________________________
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