Class: BytesStream

Represents a stream of bytes.

Constructor

Initialize the stream.

init (stream<anydata, Error?> anydataStream)

Methods

next

Retrieve the next value of the stream.

close

Close the stream.

function next() returns record {| value byte[ ] |} | Error?
Isolated Function

Retrieve the next value of the stream.

Return Type

(record {| value byte[ ] |} | Error?)

Returns the next value of the stream or else an error

close

function close() returns Error?
Isolated Function

Close the stream.

Return Type

(Error?)

Returns an error if failed to close the stream