i just want to ask since i can read/write in fileconnection the contents of a file, is there a way to delete the contents of it also?
what i want is before i write to the file, i must clear it first so that that contents are all new..
what i've done is like this:
1) i open a file connection using:
2) open the data output stream by:
3) then write to the file the contents of writetocsv but before i write, i'll delete first:
please help me thank you
what i want is before i write to the file, i must clear it first so that that contents are all new..
what i've done is like this:
1) i open a file connection using:
FileConnection fconn = (FileConnection)Connector.open("file://localhost/" + currDirName + currFile, Connector.READ_WRITE);
2) open the data output stream by:
DataOutputStream ops = fconn.openDataOutputStream();
3) then write to the file the contents of writetocsv but before i write, i'll delete first:
ops.write(writetocsv);
please help me thank you