code: BlockTree toSorted(Row row)
    {
      if (getIndex() == BLOCK_SIZE) {
        return this;
      }
      
      int keyLength = row.keyLength();
      
      _sortHead = getIndex();
      
      _keyMinSort = new byte[keyLength];
      _keyMaxSort = new byte[keyLength];
      
      int minOffset = 1;
      int maxOffset = minOffset + keyLength;
      int tupleLength = row.getTreeItemLength();
      
      byte []buffer = getBuffer();
      
      System.arraycopy(buffer, _sortHead + maxOffset,
                       _keyMaxSort, 0, 
                       keyLength);
      
      System.arraycopy(buffer, BLOCK_SIZE - tupleLength + minOffset,
                       _keyMinSort, 0, 
                       keyLength);
      
      return this;
    }
docs: /*
  BlockTree copy(int newPid)
  {
  BlockTree newBlock = new BlockTree(newPid);
  
  System.arraycopy(getBuffer(), 0, newBlock.getBuffer(), 0, BLOCK_SIZE);
  
  newBlock.setIndex(getIndex());
  
  return newBlock;
  }