title: Parsing a log file in Java
body: <p>All,</p>
  
  <p>I have a log file with the below content.</p>
  
  <pre><code>Request from Centercord.
  2010-12-14 12:42:13.724 [ 6796] ****************************
  2010-12-14 12:42:13.724 [ 6796] 1111111111111111
  2010-12-14 12:42:13.724 [ 6796]22222222222
  
  Response from Centercord.
  2010-12-14 12:42:21.802 [ 5960] 11111111111111
  2010-12-14 12:42:21.802 [ 5960]  ffffffffffffffffffffffffffff
  2010-12-14 12:42:21.802 [ 5960]  tttttttttttttttttttttttttttt
  
  Request from Centercord.
  2010-12-14 12:42:13.724 [ 6796] ****************************
  </code></pre>
  
  <p>I need to create two log files one is for storing all the Request details and the other one is for storing all the Response details. How can I parse this and prepare two log files?.</p>
  
  <p>I need the below answer.</p>
  
  <pre><code>Log 1:
  
  Request from Centercord.
  2010-12-14 12:42:13.724 [ 6796] ****************************
  2010-12-14 12:42:13.724 [ 6796] 1111111111111111
  2010-12-14 12:42:13.724 [ 6796]22222222222
  
  2010-12-14 12:42:13.724 [ 6796] ****************************
  
  Log 2:
  
  Response from Centercord.
  2010-12-14 12:42:21.802 [ 5960] 11111111111111
  2010-12-14 12:42:21.802 [ 5960]  ffffffffffffffffffffffffffff
  2010-12-14 12:42:21.802 [ 5960]  tttttttttttttttttttttttttttt
  </code></pre>
  
  <p>Regards,
  Kanagaraj</p>