interface MutableBytes48 : MutableBytes, Bytes48
(source)
A mutable Bytes48, that is a mutable Bytes value of exactly 48 bytes.
static val EMPTY: MutableBytes
The empty value (with 0 bytes). |
|
static val SIZE: Int
The number of bytes in this value - i.e. 48 |
|
static val ZERO: Bytes48
A |
open static fun create(): MutableBytes48
Create a new mutable 48 bytes value. |
|
open static fun wrap(value: ByteArray): MutableBytes48
Wrap a 48 bytes array as a mutable 48 bytes value. open static fun wrap(value: ByteArray, offset: Int): MutableBytes48
Wrap a the provided array as a MutableBytes48. Note that value is not copied, only wrapped, and thus any future update to open static fun wrap(value: MutableBytes): MutableBytes48
Wrap a the provided value, which must be of size 48, as a MutableBytes48. Note that value is not copied, only wrapped, and thus any future update to open static fun wrap(value: MutableBytes, offset: Int): MutableBytes48
Wrap a slice/sub-part of the provided value as a MutableBytes48. Note that the value is not copied, and thus any future update to |
open fun and(other: Bytes48): Bytes48
Return a bit-wise AND of these bytes and the supplied bytes. |
|
open fun clear(): Unit
Set all bytes in this value to 0. |
|
open fun decrement(): MutableBytes
Decrements the value of the bytes by 1, treating the value as big endian. If decrementing underflows the value then all bits flip, i.e. decrementing 0x0000 will return 0xFFFF. |
|
open fun fill(b: Byte): Unit
Fill all the bytes of this value with the specified byte. |
|
open fun increment(): MutableBytes
Increments the value of the bytes by 1, treating the value as big endian. If incrementing overflows the value then all bits flip, i.e. incrementing 0xFFFF will return 0x0000. |
|
abstract fun mutableSlice(i: Int, length: Int): MutableBytes
Create a mutable slice of the bytes of this value. Note: the resulting slice is only a view over the original value. Holding a reference to the returned slice may hold more memory than the slide represents. Use |
|
open fun or(other: Bytes48): Bytes48
Return a bit-wise OR of these bytes and the supplied bytes. |
|
abstract fun set(i: Int, b: Byte): Unit
Set a byte in this value. |
|
open fun setInt(i: Int, value: Int): Unit
Set the 4 bytes starting at the specified index to the specified integer value. |
|
open fun setLong(i: Int, value: Long): Unit
Set the 8 bytes starting at the specified index to the specified long value. |
|
open fun xor(other: Bytes48): Bytes48
Return a bit-wise XOR of these bytes and the supplied bytes. |