I have text file that was encoded with UTF8 (for language specific characters). I need to use RandomAccessFile to seek specific position and read from.
I want read line-by-line.
String str = myreader.readLine(); //returns wrong text, not decoded
String str myreader.readUTF(); //An exception occurred: java.io.EOFException
See Question&Answers more detail:os