title: Capture byte number/offset for SAXParser
body: <p>Like in <a href="https://stackoverflow.com/questions/3507350/java-xml-parsing-and-original-byte-offsets">this question</a> I am trying to record the exact position when parsing XML.</p>
  
  <p>I already use the SAX <code>Locator</code> passed to <code>setDocumentLocator()</code> to record the line and column number but that doesn't give the offset from the beginning of the file. Is there a way to find the number of bytes read so far by the SAX parser or offset of each line without re-reading the whole file?</p>