Generator that returns the datastream content in chunks, so
        larger datastreams can be used without reading the entire
        contents into memory.

def get_chunked_content(self, chunksize=4096):
        '''Generator that returns the datastream content in chunks, so
        larger datastreams can be used without reading the entire
        contents into memory.'''

        # get the datastream dissemination, but return the actual http response
        r = self.obj.api.getDatastreamDissemination(self.obj.pid, self.id,
            stream=True,  asOfDateTime=self.as_of_date)
        # read and yield the response in chunks
        for chunk in r.iter_content(chunksize):
            yield chunk