Re: reading in text files
Re: reading in text files
- Subject: Re: reading in text files
- From: Lance Bland <email@hidden>
- Date: Fri, 1 Feb 2002 07:11:32 -0500
On Friday, February 1, 2002, at 06:45 AM, jgo wrote:
If you need more impressive services, check NSScanner.
myFile is large (can be up to 16000 bytes), so I don't think
reading the whole thing into an NSString would be good.
That's not large, that's small. Such files can be read into
memory and worked on there without any caveats.
I'll bite. What if the file were 160MB... or 1.6GB?
How would one have it read in only a continuous series
of chunks and have it parse them, while minimizing monkeying
around with chunk boundary conditions?
There is no class in Cocoa that can efficiently (effectively?) handle
that size of data (at least, not to my satisfaction). You have to roll
your own. Fortunately, you can do that easily because you can access
ANSI-C file methods and roll Obj-C methods and classes around them.
- lance
_______________________________________________
Lance Bland
System Administrator at VVI
mailto:email@hidden
http://www.vvi.com
Realtime, bulk and web data reporting and visualization