Properties

new MessageId([id])

Create a MessageId from a byte array.

Parameter

Name Type Optional Description

id

 

Yes

The byte array containing the message ID. When undefined, this will construct an empty message ID.

Properties

read-only

binary  Uint8Array

The raw binary data.

read-only

length  number

The byte-length of the data. This is a read-only property.

Methods

static

fromString(hex) → SparkCommunications.Messenger.MessageId

Returns a MessageId object constructed from the given hex encoded data string.

Parameter

Name Type Optional Description

hex

string

 

The hexadecimal string representation of the data. When the string is not empty, it must contain only an even number of characters, which can be upper- or lowercase.

Throws

Error

When the hex string contains illegal characters or cannot be converted in its entirety.

Returns

SparkCommunications.Messenger.MessageId

The MessageId object containing the binary representation of the given hex string data.

toString() → String

Converts the binary data to hex for readable output.

Returns

The hex representation of the binary .

toString() → String

Converts the binary data to hex for readable output.

Returns

The hex representation of the binary .