public void parseFile(ChatEventParseListener listener){
synchronized (this) {
    @SuppressWarnings("unused") long startTime=System.currentTimeMillis();
    BufferedReader reader=null;
    try {
      reader=new BufferedReader(new FileReader(pathToFile));
      String currentLine=reader.readLine();
      while (currentLine != null) {
        try {
          ChatEvent event=ChatEventUtils.deserializeChatEvent(currentLine);
          if (!listener.onNewEventParsed(event)) {
            break;
          }
        }
 catch (        Throwable t) {
          LOG.warn("Error reading chat event line " + currentLine + " skipping ChatEvent",t);
        }
        currentLine=reader.readLine();
      }
      listener.onParseCompleted();
    }
 catch (    IOException ioe) {
      throw new RuntimeException(ioe);
    }
 finally {
      if (reader != null) {
        try {
          reader.close();
        }
 catch (        Throwable t) {
        }
      }
    }
  }
}

public void parseFile ( ChatEventParseListener listener ) { synchronized ( this ) { @ SuppressWarnings ( "unused" ) long startTime = System . currentTimeMillis ( ) ; BufferedReader reader = null ; try { reader = new BufferedReader ( new FileReader ( pathToFile ) ) ; String currentLine = reader . readLine ( ) ; while ( currentLine != null ) { try { ChatEvent event = ChatEventUtils . deserializeChatEvent ( currentLine ) ; if ( ! listener . onNewEventParsed ( event ) ) { break ; } } catch ( Throwable t ) { LOG . warn ( "Error reading chat event line " + currentLine + " skipping ChatEvent" , t ) ; } currentLine = reader . readLine ( ) ; } listener . onParseCompleted ( ) ; } catch ( IOException ioe ) { throw new RuntimeException ( ioe ) ; } finally { if ( reader != null ) { try { reader . close ( ) ; } catch ( Throwable t ) { } } } } }
parses the chatlogger and invokes the listener on each chat event encountered .
