docs: @Override
    public void writePage(int pageID, P page) {
      try {
        countWrite();
        byte[] array = pageToByteArray(page);
        long offset = ((long) (header.getReservedPages() + pageID)) * (long) pageSize;
        assert offset >= 0 : header.getReservedPages() + " " + pageID + " " + pageSize + " " + offset;
        file.seek(offset);
        file.write(array);
        page.setDirty(false);
      }
      catch(IOException e) {
        throw new RuntimeException("Error writing to page file.", e);
      }
    }