BufferedReader is preferable to RandomAccessFile on performance grounds, but neither of them will lock the file at all unless the operating system kindly does so for you, in which case closing the file will release it.
However the operating system may also kindly prevent you reading the file at all if someone else is writing to it.
Reading a sequential file while another process is writing to it is not good design. You shouldn't really be reading log files at all. Log files are for humans. You should be using a database.