appendInt64

fun ByteStringBuilder.appendInt64(value: Long, validRange: LongRange = Long.MIN_VALUE..Long.MAX_VALUE): ByteStringBuilder

Appends a 64-bit signed integer to this ByteStringBuilder.

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

The bytes are appended in Big-Endian order.

Return

This ByteStringBuilder instance, allowing for chaining of operations.

Parameters

value

The long value to append.

validRange

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

Throws