Hi friends,
I am trying to write to a file in j2me through file connection api.
The issue i am facing is,i am able to create a file and can write the text in it.
But next time when i try to append the data at the end of file,nothing happens.
Code;
FileConnection fc=(FileConnection)Connector.open(filename,Connector.Read_Write);
if(!(fc.exists)
{
fc.create();
fc.openOutputStream();
}
else
fc.openOutputStream(Long.MAX_VALUE);
os.write(data);
os.flush();
os.close();
Now the issue is,when i run the midlet and it does not find the file,it creates it and adds the text to it.
But next time,when this file exists,it does nothing.
Can anyone tell its solution to me.
i am using nokia 5233
I have added the permissions to it in jad file.

Reply With Quote



