# File lib/rubytorrent/package.rb, line 370 def get_complete_block(beginn, length) raise "can't make block from incomplete piece" unless complete? raise "invalid parameters #{beginn}, #{length}" unless (length > 0) && (beginn + length) <= @length b = Block.new(@index, beginn, length) b.add_chunk read_bytes(beginn, length) # returns b end