open static fun wrapBuffer(buffer: Buffer!): MutableBytes!
(source)
Wrap a full Vert.x Buffer
as a MutableBytes
value.
Note that any change to the content of the buffer may be reflected in the returned value.
buffer
- Buffer!: The buffer to wrap.
Return
MutableBytes!: A MutableBytes
value.
open static fun wrapBuffer(buffer: Buffer!, offset: Int, size: Int): MutableBytes!
(source)
Wrap a slice of a Vert.x Buffer
as a MutableBytes
value.
Note that any change to the content of the buffer may be reflected in the returned value, and any change to the returned value will be reflected in the buffer.
buffer
- Buffer!: The buffer to wrap.
offset
- Int: The offset in buffer
from which to expose the bytes in the returned value. That is, wrapBuffer(buffer, i, 1).get(0) == buffer.getByte(i)
.
size
- Int: The size of the returned value.
IndexOutOfBoundsException
- if offset < 0 || (buffer.length() > 0 && offset >= buffer.length())
.
IllegalArgumentException
- if length < 0 || offset + length > buffer.length()
.
Return
MutableBytes!: A MutableBytes
value.