code: @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);
      }
    }
docs: This method is called by the cache if the <code>page</code> is not longer
  stored in the cache and has to be written to disk.
  
  @param page the page which has to be written to disk