appendInt8

fun ByteStringBuilder.appendInt8(value: Int, validRange: IntRange = Byte.MIN_VALUE..Byte.MAX_VALUE): ByteStringBuilder

Appends an 8-bit signed integer to this ByteStringBuilder.

This function appends the value as a single byte 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 Byte.MIN_VALUE to Byte.MAX_VALUE

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 Byte.MIN_VALUE..Byte.MAX_VALUE.

Throws


fun ByteStringBuilder.appendInt8(value: Byte, validRange: IntRange = Byte.MIN_VALUE..Byte.MAX_VALUE): ByteStringBuilder

Appends an 8-bit signed integer to this ByteStringBuilder.

This function appends the value as a single byte 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 Byte.MIN_VALUE to Byte.MAX_VALUE

Return

This ByteStringBuilder instance, allowing for chaining of operations.

Parameters

value

The byte value to append.

validRange

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

Throws