Since the memory capacity of the device is unknown, a fixed size buffer could cause problems. The public API now returns the size of the downloaded data.