private int readEpoch(File epochFile){
  int epoch=-1;
  if (!epochFile.exists()) {
    return epoch;
  }
  try {
    Scanner scanner=new Scanner(epochFile);
    epoch=scanner.nextInt();
    log.debug("Got epoch {} from file {}",epoch,epochFile.getName());
  }
 catch (  IOException e) {
    log.error("read epoch from file({}) failed. e=",epochFile.getName(),e);
  }
  return epoch;
}

private int readEpoch ( File epochFile ) { int epoch = - 1 ; if ( ! epochFile . exists ( ) ) { return epoch ; } try { Scanner scanner = new Scanner ( epochFile ) ; epoch = scanner . nextInt ( ) ; log . debug ( "Got epoch {} from file {}" , epoch , epochFile . getName ( ) ) ; } catch ( IOException e ) { log . error ( "read epoch from file({}) failed. e=" , epochFile . getName ( ) , e ) ; } return epoch ; }
read epoch from epoch file
