putUInt32
Writes a UInt32 value to the byte array at the specified offset.
This function takes an unsigned integer value
and writes it as four bytes (UInt32) into the byte array at the specified offset
. It also validates that the value
falls within a specified range, ensuring it can be represented as an unsigned four-byte integer.
Parameters
The offset (index) in the byte array where the UInt32 value should be written. Must be within the valid range of the array's indices.
The UInt32 value to be written.
The valid range for the value
. Defaults to UInt.MIN_VALUE
to UInt.MAX_VALUE
(i.e., 0 to 4294967295). Any value outside this range will cause an exception to be thrown.
Throws
If the value
is outside the specified validRange
.
If the offset
or offset
+ 3 is negative or greater than or equal to the array's size.