My experience is that RandomAccessFile is a lot slower than using FileOutputStream and FileInputStream. If the file can be processed linearly, RAF is a waste of time. Even for random access, I found that I could get better performance by creating a brand new FileOutputStream, using skip() to get to the desired position, reading from there, and then closing the reader.
Also, the readLine() method is basically useless if you need to support Unicode. I can create a BufferedReader wrapped around an InputStreamReader to read any encoding I want - not so with RAF. I mean, it's
possible with RAF, but it's a lot more of a pain.
The fact that you can both read and write using the same class may seem like a benefit - but it generaly only works for wixed-length file formats. You can't replace a
string with a longer string without overwriting subsequent data.
I'll concede RAF may be easier to use at first - but usually there's a better solution, for any given problem. IMO of course.