code: @Override
    protected void flushAndSync(boolean durable) throws IOException {
      if (fp == null) {
        throw new IOException("Trying to use aborted output stream");
      }
      preallocate(); // preallocate file if necessary
      if (doubleBuf.isFlushed()) {
        return;
      }
      doubleBuf.flushTo(fp);
      if (durable) {
        fc.force(false); // metadata updates not needed
      }
      fc.position(fc.position() - 1); // skip back the end-of-file marker
    }
docs: Flush ready buffer to persistent store. currentBuffer is not flushed as it
  accumulates new log records while readyBuffer will be flushed and synced.