open static fun wrapBuffer(buffer: Buffer!): Bytes! (source)
Wrap a full Vert.x Buffer as a Bytes value.
Note that any change to the content of the buffer may be reflected in the returned value.
buffer - Buffer!: The buffer to wrap.
open static fun wrapBuffer(buffer: Buffer!, offset: Int, size: Int): Bytes! (source)
Wrap a slice of a Vert.x Buffer as a Bytes value.
Note that any change to the content of the buffer may be reflected in the returned value.
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().