code: private int getNumBlocks(R delta) {
          ByteBuffer content = getValue(delta);
          int numBlocks = 0;
  
          // build numBlocks by adding together each hex digit
          for (int i = 0; i < _prefixLength; i++) {
              byte b = content.get(i);
              numBlocks = numBlocks << 4 | (b <= '9' ? b - '0' : b - 'A' + 10);
          }
  
          return numBlocks;
      }
docs: converts utf-8 encoded hex to int by building it digit by digit.