'Add another blob to this image using its hash.'

def AddBlob(self, blob_hash, length, chunk_number):

    if (len(blob_hash) != self._HASH_SIZE):
        raise ValueError(("Hash    '%s'    doesn't    have    correct    length    (%d)." % (blob_hash, self._HASH_SIZE)))
    if (not self.ChunkExists(chunk_number)):
        self.size += length
        self._dirty = True
        if (chunk_number > self.last_chunk):
            self.last_chunk = chunk_number
            self._dirty = True
    index_urn = self.urn.Add((self.CHUNK_ID_TEMPLATE % chunk_number))
    with aff4.FACTORY.Create(index_urn, aff4.AFF4MemoryStream, token=self.token) as fd:
        fd.write(blob_hash)
    if (chunk_number in self.chunk_cache):
        self.chunk_cache.Pop(chunk_number)
