Skip to main content


Reads data from a blob into a new blob


Device + Agent


Name Type Description
numberOfBytes Integer The number of bytes to read


Blob — the sourced bytes as a new blob


This method reads the specified number of bytes from the blob and returns them as a new blob.

The new blob’s bytes are taken from the current read/write pointer onwards. The pointer can be determined using the tell() method and set using the seek() method.

Only those bytes up to the end the source blob are read; if the call asks for 256 bytes but the read/write pointer is 128 bytes from the end, the new blob will be 128 bytes long.

The size of the new blob can be verified using the len() method.

Example Code