appendInt16Le

fun ByteStringBuilder.appendInt16Le(value: Int, validRange: IntRange = Short.MIN_VALUE..Short.MAX_VALUE): ByteStringBuilder

Appends a 16-bit signed integer to this ByteStringBuilder in Little-Endian order.

This function appends the value as two bytes to the end of this ByteStringBuilder. It also validates that the provided value is within the specified validRange. By default the valid range is from Short.MIN_VALUE to Short.MAX_VALUE.

The bytes are appended in Little-Endian order.

Return

This ByteStringBuilder instance, allowing for chaining of operations.

Parameters

value

The integer value to append.

validRange

The valid range for the integer value. Defaults to Short.MIN_VALUE..Short.MAX_VALUE.

Throws