tuweni / org.apache.tuweni.bytes / Bytes / ofUnsignedInt

ofUnsignedInt

open static fun ofUnsignedInt(value: Long): Bytes! (source)

Return a 4-byte value corresponding to the provided value interpreted as an unsigned int.

Parameters

value - Long: The value, which must be no larger than an unsigned int.

Exceptions

IllegalArgumentException - if value < 0 or value is too big to fit an unsigned 4-byte int (that is, if value >= (1L << 32)).

Return
Bytes!: A 4 bytes value corresponding to value.

open static fun ofUnsignedInt(value: Long, order: ByteOrder!): Bytes! (source)

Return a 4-byte value corresponding to the provided value interpreted as an unsigned int.

Parameters

value - Long: The value, which must be no larger than an unsigned int.

order - ByteOrder!: The byte-order for the integer encoding.

Exceptions

IllegalArgumentException - if value < 0 or value is too big to fit an unsigned 4-byte int (that is, if value >= (1L << 32)).

Return
Bytes!: A 4 bytes value corresponding to the encoded value.