Used to obtain the data in stream.
Returns the chunk of data of size 'chunkSize' from the given offset.