public void readIndex() throws ReplicatorException {
  if (logger.isDebugEnabled())   logger.debug("Reading binlog index: " + indexFile.getAbsolutePath());
  FileInputStream fis=null;
  try {
    fis=new FileInputStream(this.indexFile);
    InputStreamReader reader=new InputStreamReader(fis);
    @SuppressWarnings("resource") BufferedReader bufferedReader=new BufferedReader(reader);
    binlogFiles=new ArrayList<File>();
    String binlogName=null;
    while ((binlogName=bufferedReader.readLine()) != null) {
      File binlogFile=new File(this.binlogDirectory,binlogName.trim());
      binlogFiles.add(binlogFile);
    }
  }
 catch (  FileNotFoundException e) {
    throw new MySQLExtractException("Binlog index file not found: " + indexFile.getAbsolutePath(),e);
  }
catch (  IOException e) {
    throw new MySQLExtractException("Error reading binlog index file: " + indexFile.getAbsolutePath(),e);
  }
 finally {
    if (fis != null) {
      try {
        fis.close();
      }
 catch (      IOException e) {
      }
    }
  }
}

public void readIndex ( ) throws ReplicatorException { if ( logger . isDebugEnabled ( ) ) logger . debug ( "Reading binlog index: " + indexFile . getAbsolutePath ( ) ) ; FileInputStream fis = null ; try { fis = new FileInputStream ( this . indexFile ) ; InputStreamReader reader = new InputStreamReader ( fis ) ; @ SuppressWarnings ( "resource" ) BufferedReader bufferedReader = new BufferedReader ( reader ) ; binlogFiles = new ArrayList < File > ( ) ; String binlogName = null ; while ( ( binlogName = bufferedReader . readLine ( ) ) != null ) { File binlogFile = new File ( this . binlogDirectory , binlogName . trim ( ) ) ; binlogFiles . add ( binlogFile ) ; } } catch ( FileNotFoundException e ) { throw new MySQLExtractException ( "Binlog index file not found: " + indexFile . getAbsolutePath ( ) , e ) ; } catch ( IOException e ) { throw new MySQLExtractException ( "Error reading binlog index file: " + indexFile . getAbsolutePath ( ) , e ) ; } finally { if ( fis != null ) { try { fis . close ( ) ; } catch ( IOException e ) { } } } }
refreshes the list of binlog files from current index contents .
