Node.js Buffer.readInt16BE() Method
The Buffer.readInt16BE() Method is an inbuilt application programming interface of class Buffer with in Buffer module which reads a 16-bit signed integer from the buffer at the specified offset in the big endian format.
Buffer.readInt16BE( offset )
Parameters: This method accepts a single parameter offset which specifies the number (integer) of bytes to skip before starting to write. The value of offset lies within the range 0 <= offset <= buf.length – 2. Its default value is zero.
Return value: It returns the offset along with number of bytes written.
internal/buffer.js:72 throw new ERR_OUT_OF_RANGE(type || 'offset', ^ RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 and <= 0. Received 1 . . .