code: private void upgradeLeaf(TableEntry10 table, 
                             TableUpgrade upgradeTable,
                             Page10 page)
      throws IOException
    {
      try (ReadStream is = openRead(page.segment().address(),
                                    page.segment().length())) {
        is.position(page.address());
        
        byte []minKey = new byte[table.keyLength()];
        byte []maxKey = new byte[table.keyLength()];
        
        is.read(minKey, 0, minKey.length);
        is.read(maxKey, 0, maxKey.length);
        
        int blocks = BitsUtil.readInt16(is);
        
        for (int i = 0; i < blocks; i++) {
          upgradeLeafBlock(is, table, upgradeTable, page);
        }
      }
    }
docs: Upgrade a table page.