readShortBe

Reads a 16-bit signed integer in big-endian order starting at offset.

Big-endian means the most significant byte is stored at the lowest index, so the byte at offset contributes bits 8..15 and the byte at offset + 1 contributes bits 0..7.

Return

the decoded value.

Parameters

offset

the index of the first byte to read.

Throws

if offset is negative or offset + 2 exceeds the array size.