appendUInt32

fun ByteStringBuilder.appendUInt32(value: UInt, validRange: UIntRange = UInt.MIN_VALUE..UInt.MAX_VALUE): ByteStringBuilder

Appends a 32-bit unsigned integer to this ByteStringBuilder.

This function appends the value as four 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 UInt.MIN_VALUE to UInt.MAX_VALUE.

The bytes are appended in Big-Endian order.

Return

This ByteStringBuilder instance, allowing for chaining of operations.

Parameters

value

The unsigned integer value to append.

validRange

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

Throws


fun ByteStringBuilder.appendUInt32(value: Int, validRange: UIntRange = UInt.MIN_VALUE..UInt.MAX_VALUE): ByteStringBuilder

Appends a 32-bit unsigned integer to this ByteStringBuilder.

This function appends the value as four 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 UInt.MIN_VALUE to UInt.MAX_VALUE.

The bytes are appended in Big-Endian order.

Return

This ByteStringBuilder instance, allowing for chaining of operations.

Parameters

value

The integer value to append.

validRange

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

Throws