Hy, I am using FileWriter
to write some text on SD Card, like so
FileWriter write = new FileWriter(Environment.getExternalStorageDirectory().toString() + "text.txt", true);
write.append("This is first written");
write.close();
Now when i write some other text
FileWriter write = new FileWriter(Environment.getExternalStorageDirectory().toString() + "text.txt", true);
write.append("This is second written");
write.close();
And look in this file, it look so
This is first written
This is second writtn
Now, my question is, how can i write this second text and position it above the first text, I haven't found any seek option. I know that i can first read the text, and than write a new file and put at last the readen text, but is there any other solution?