'Read the whole block stream into the self-BytesIO.'

def read_block_stream(self, block_stream):

    if (not (isinstance(block_stream, io.IOBase) or isinstance(block_stream, file))):
        raise TypeError('Stream    does    not    have    the    buffer    interface.')
    while True:
        data = self._next_block(block_stream)
        if (not self.write(data)):
            break
    self.seek(0)
