title: Fast text file parsing in java
body: <p>I have a number of text files which are in a fixed, repeated format like:</p>
  
  <pre><code>Q 32,0 16
  q 27
  b 21
  I 0
  P 1
  d 0
  m 31,0
  Q 48,0 16
  q 27
  b 2
  I 2
  P 1
  d 0
  m 31,0
  .
  .
  .
  </code></pre>
  
  <p>I want to parse them in Java. What I want to know is the fastest method to parse such a text file. I can change the output format of the text file if that helps with the performance, as the only requirement here is speed of parsing.
  I can use external libraries too.</p>