title: How do I know where I am in the file if I read it with a FileReader?
body: <p>I have a bit of code like this: </p>
  
  <pre><code>FileReader fr = new FileReader(file);
  BufferedReader reader = new BufferedReader(fr);
  for (int i=0;i&lt;100;i++) 
  {
     String line = reader.readLine(); 
     ...
  }
  
  // at this point I would like to know where I am in the file.
  // let's assign that value to 'position' 
  // then I would be able to continue reading the next 100 lies (this could be done later on ofcourse... )
  // by simply doing this: 
  
  FileReader fr = new FileReader(file);
  fr.skip(position); 
  BufferedReader reader = new BufferedReader(fr);
  for (int i=0;i&lt;100;i++) 
  {
     String line = reader.readLine(); 
     ...
  }
  </code></pre>
  
  <p>I can't figure out how to get/compute the value for 'position'.</p>
  
  <p>Two things:
  I don't have obviously a fixed length file (i.e.: every line has a different length)
  I need to make it work on any system (linux, unix, windows) so I am not sure if I can assume the length of newline (whether it's one or two chars)</p>
  
  <p>Any help very much appreciated. </p>
  
  <p>Thanks,</p>