FileConnection - How do i set append to true?
Currently i am able get the text and write to a text file using Fileconnection. However, i could not append to the text file that i want, it will jus keep overwrites it.
This is my codes.
//connection
try{
fconn = (FileConnection) Connector.open("file:///root1//helpLog.txt");
if (!fconn.exists())
fconn.create();
out = fconn.openOutputStream();
}
catch(IOException ex){
ex.printStackTrace();
}
//A method for write to file
public synchronized void writeToFile(String message) {
try {
out.write((message + "//").getBytes());
out.flush();
} catch (Exception e){
}
}

