View Single Post
Old 11-21-2011, 10:27 PM   #3 (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
Default Re: Read String in File text.

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 StringBuffer,

StringBuffer sb = new StringBuffer(data.length);

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