rlp / org.apache.tuweni.rlp / RLP / encodeListTo

encodeListTo

static fun <T : ByteBuffer> encodeListTo(buffer: T, fn: Consumer<RLPWriter>): T (source)

Encode a list of values to a ByteBuffer.

Parameters

buffer - The buffer to write into, starting from its current position.

fn - A consumer that will be provided with a RLPWriter that can consume values.

- The type of the buffer.

Exceptions

BufferOverflowException - If the writer attempts to write more than the provided buffer can hold.

ReadOnlyBufferException - If the provided buffer is read-only.

Return
The buffer.