Skip to main content

blob.readblob(numberOfBytes)

Reads data from a blob into a new blob

Availability

Device + Agent

Parameters

Name Type Description
numberOfBytes Integer The number of bytes to read

Returns

Blob — the sourced bytes as a new blob

Description

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