4 Replies Latest reply on Apr 6, 2007 5:29 AM by 807606

    RandomAccessFile tailing with UTF-8

    807606
      Dear All,

      I wish to write a program which mimics the unix "tail -f" command using a
      RandomAccessFile
      . However, the program must work with UTF-8 encoded files.
      There is an implementation described at http://www.informit.com/guides/content.asp?g=java&seqNum=226&rl=1, but it assumes the default system encoding.

      Could anyone tell me if what I am trying to do is even possible. I have resorted to using a
      BufferedReader
      instead, but it is not as neat a solution since it is important that the
      readLine()
      method blocks until a newline character is read.

      Regards,

      Fred