• 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 a line at a time with NSData?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading a line at a time with NSData?


  • Subject: Re: Reading a line at a time with NSData?
  • From: Timo Hoepfner <email@hidden>
  • Date: Tue, 6 Jan 2009 12:56:56 +0100

Hi,

try something like this:

NSData data = ...; // your existing NSData object

try {
BufferedReader reader = new BufferedReader(new InputStreamReader (data.stream()));
try {
while (reader.ready()) {
String line = reader.readLine();
// process line
}
} finally {
reader.close();
}
} catch (IOException e) {
// handle exception
}


Timo

Am 05.01.2009 um 20:56 schrieb James Cicenia:

I have an NSData object. I am using the sample AJAXFileUpload
which gives me an NSData object. I  am reading in a tab delimited
text file and was wondering how do I read line per line.

Thanks
James Cicenia
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40onlinehome.de


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Reading a line at a time with NSData? (From: James Cicenia <email@hidden>)

  • Prev by Date: Re: Not finding binding with "$^" notation
  • Next by Date: Re: ERXEC.newEditingContext() access
  • Previous by thread: Re: Reading a line at a time with NSData?
  • Next by thread: Re: Reading a line at a time with NSData?
  • Index(es):
    • Date
    • Thread