private void openLogFile() throws IOException {
  try {
    close();
  }
 catch (  IOException e) {
  }
  logName=versionName(logfilePrefix);
  log=new RandomAccessFile(logName,"rw");
  logFD=log.getFD();
  if (logBytes == 0) {
    format=FORMAT_PADDED;
    writeInt(log,MAGIC);
    writeInt(log,format);
    logBytes=(intBytes + intBytes);
  }
 else {
    log.seek(logBytes);
  }
  log.setLength(logBytes);
  log.write(zeroBuf);
  logFD.sync();
}

private void openLogFile ( ) throws IOException { try { close ( ) ; } catch ( IOException e ) { } logName = versionName ( logfilePrefix ) ; log = new RandomAccessFile ( logName , "rw" ) ; logFD = log . getFD ( ) ; if ( logBytes == 0 ) { format = FORMAT_PADDED ; writeInt ( log , MAGIC ) ; writeInt ( log , format ) ; logBytes = ( intBytes + intBytes ) ; } else { log . seek ( logBytes ) ; } log . setLength ( logBytes ) ; log . write ( zeroBuf ) ; logFD . sync ( ) ; }
opens the incremental update log file in read / write mode . if the file does not exist , it is created .
