def createBlockinfoByBlockIndex(blockIndex)
      pieceIndex = blockIndex / @blockSize
      offset = (blockIndex % @blocksPerPiece)*@blockSize
      length = @blockSize
      raise "offset in piece is not divisible by block size" if offset % @blockSize != 0
      BlockInfo.new(pieceIndex, offset, length, [], blockIndex)
    end
def createBlockinfoByBlockIndex(blockIndex)
      pieceIndex = blockIndex / @blockSize
      offset = (blockIndex % @blocksPerPiece)*@blockSize
      length = @blockSize
      raise "offset in piece is not divisible by block size" if offset % @blockSize != 0
      BlockInfo.new(pieceIndex, offset, length, [], blockIndex)
    end
Create a new BlockInfo object using the specified information. The peers list is empty.