2 Replies Latest reply: Oct 7, 2006 2:41 PM by 807607 RSS

    Read specific line with random access file

    807607
      Hi guys,
      I'm trying to read certain token from a line(say 3rd line from end). yesterday somebody suggested me to try with random access file. But I couldn't find a way to do it by that clas. seek() method take me to the certain position in that line. but first I need to go to that file.

      Right now at first I'm reading that whole file and counting the number of line in it. then again I'm reading that file and going to that specific line(by substracting 3 from total number). I think its not a smart way to do this. is there any other way to do this by using "randon access file"?
      Pls help me out here.

      Thanks,