02-12-2010, 03:49 PM
Join Date: Feb 2010
Post Thanks: 0
Thanked 0 Times in 0 Posts
| | FileConnection fails after several iterations.
Please Login to Remove!
I wrote a program that periodically(every minute) receives updated data from server. Once the data is received it overwrites to the corresponding line of the file. ( code below )
Code below runs fine for first few iterations but throws IOException after.
byte contents = bout.toByteArray(); // it always has fresh data.
conn = (FileConnection)Connector.open("file:///SDCard/update.txt");
out = conn.openOutputStream(index*rowSize);