code: private int getRingCursor(ByteBuffer buffer) {
          int c = buffer.getInt(4);
          checkState(c >= FILE_PROLOGUE_BYTES, "Integer overflow");
          return c;
      }
docs: Returns the offset from the file start where the latest block should be written (end of prev block).