Re: Reading a line at a time with NSData?
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