I am using the below code segment to write text to the end o the file for each time it is called. But, it is erasing the old data and then writes the new data to the beginni
Try to set append boolean value to true in FileOutputStream:
boolean
FileOutputStream
outStream = new FileOutputStream(out, true); outStreamWriter = new OutputStreamWriter(outStream);