title: Know the offset of a file using BufferedReader?
body: <p>I am a newbie to java. I am reading a big file using <code>BufferedReader</code>. How can I know the offset of a line so that I can store it in some other file for indexing purposes?</p>
  
  <p>EDIT:
  Here's my code</p>
  
  <pre><code>path=FileSystems.getDefault().getPath(".",filename);
  br=Files.newBufferedReader(path_doc_title_index_path, Charset.defaultCharset());
  int offset=0; //offset of first line.       
  String strline=br.readline();
  offset+=strline.length()+1; //offset of second line
  </code></pre>