• 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
Re: reading in text files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: reading in text files


  • Subject: Re: reading in text files
  • From: jgo <email@hidden>
  • Date: Fri, 1 Feb 2002 03:45:54 -0800

> From: Ondra Cada <email@hidden> Fri, 2002-02-01 01:38:58 +0100
>> Ben Mackin wrote at Thu, 2002-01-31 15:36:49 -0800:
>>> ??? wrote:
>>> NSArray *a=[[NSString stringWithContentsOfFile:theFile]
>>> componentsSeparatedByString:@" "];
>>>
>>> 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?

John G. Otto, Eagle Scout, Knight, Cybernetic Praxeologist
Existence, Consciousness, Identity, Life, Liberty, Property, Privacy, Justice
<http://gosc.nisus.com/~giovanni>


  • Follow-Ups:
    • Re: reading in text files
      • From: "Erik M. Buck" <email@hidden>
    • Re: reading in text files
      • From: Marcel Weiher <email@hidden>
    • Re: reading in text files
      • From: Bob Savage <email@hidden>
    • Re: reading in text files
      • From: Lance Bland <email@hidden>
  • Prev by Date: Re: ProgressIndicator: Chasing Arrow missing in cocoa?
  • Next by Date: Re: reading in text files
  • Previous by thread: Re: reading in text files
  • Next by thread: Re: reading in text files
  • Index(es):
    • Date
    • Thread