I am randomly accessing a file and want to append text at the end of the file. I am trying following code.
File file = new File("C:\\myFile.txt");
RandomAccessFile raf = new RandomAccessFile(file, "rw");
raf.seek(file.length());
raf.write("MyMessage");
I get exception at following like:
saying:
The method write(int) in the type RandomAccessFile is not applicable for the arguments (String)
Any clues??