open static fun ofUnsignedShort(value: Int): Bytes
(source)
Return a 2-byte value corresponding to the provided value interpreted as an unsigned short.
value
- The value, which must be no larger than an unsigned short.
IllegalArgumentException
- if value < 0
or value
is too big to fit an unsigned 2-byte short (that is, if value >= (1 << 16)
).
Return
A 2 bytes value corresponding to value
.
open static fun ofUnsignedShort(value: Int, order: ByteOrder): Bytes
(source)
Return a 2-byte value corresponding to the provided value interpreted as an unsigned short.
value
- The value, which must be no larger than an unsigned short.
order
- The byte-order for the integer encoding.
IllegalArgumentException
- if value < 0
or value
is too big to fit an unsigned 2-byte short (that is, if value >= (1 << 16)
).
Return
A 2 bytes value corresponding to value
.