'Create new blob hashes and append to BlobImage.
We don\'t support writing at arbitrary file offsets, but this method provides
a convenient way to add blobs for a new file, or append content to an
existing one.
Args:
src_fd: source file handle open for read
Raises:
IOError: if blob has already been finalized.'

def AppendContent(self, src_fd):

    while 1:
        blob = src_fd.read(self.chunksize)
        if (not blob):
            break
        blob_hash = data_store.DB.StoreBlob(blob, token=self.token)
        self.AddBlob(blob_hash.decode('hex'), len(blob))
    self.Flush()
