View Single Post
Old 11-23-2011, 12:27 AM   #4 (permalink)
Knows Where the Search Button Is
Join Date: Nov 2011
Model: 9800T
Carrier: Rogers Canada
Posts: 34
Post Thanks: 3
Thanked 5 Times in 5 Posts
Thumbs up Re: Read String in File text.

Originally Posted by berryapp View Post
Like in the earlier reply, once you have the connection, you could get the InputStream. You can then use the IOUtilities class provided by RIM to read the whole content into an array.

InputStream in = fconn.openInputStream();
byte[] data = IOUtilities.streamToBytes( in );

You could then set the data in a String,

String = new String(data.); // need to use String

For small data file this would be an easier way to go.
String = new String(data.); // need to use String
Offline   Reply With Quote
The Following User Says Thank You to berryapp For This Useful Post:
bankkab (11-23-2011)