Is it possible to position cursor to the start of a specific line in a file through RandomAccessFile?
For e.g. I want to change String starting at char 10 till 20 in
I'm not sure but seems RandomAccessFile do not support such functionality. As RAF operates with bytes we can skip specific amount of bytes, and if your file has fixed line width this can be achieved by
file.skipBytes(110 * lineSizeInBytes);
Otherwise, you need something like this:
for (int i = 0; i < 110; i++) file.readLine();
String line = file.readLine();