tuweni / org.apache.tuweni.rlp / RLPWriter

RLPWriter

interface RLPWriter (source)

A writer for encoding values to RLP.

Functions

writeBigInteger

Write a big integer to the output.

open fun writeBigInteger(value: BigInteger!): Unit

writeByte

Encode a byte to RLP.

open fun writeByte(value: Byte): Unit

writeByteArray

Encode a byte array to RLP.

open fun writeByteArray(value: ByteArray!): Unit

writeInt

Write an integer to the output.

open fun writeInt(value: Int): Unit

writeList

Write a list of values.

abstract fun writeList(fn: Consumer<RLPWriter!>!): Unit

Write a list of values, sending each value to a function to be interpreted.

open fun <T : Any!> writeList(elements: MutableList<T>!, elementWriter: BiConsumer<RLPWriter!, T>!): Unit

writeLong

Write a long to the output.

abstract fun writeLong(value: Long): Unit

writeRLP

Append an already RLP encoded value.

abstract fun writeRLP(value: Bytes!): Unit

writeString

Write a string to the output.

open fun writeString(str: String!): Unit

writeUInt256

Write a UInt256 to the output.

open fun writeUInt256(value: UInt256!): Unit

writeValue

Encode a Bytes value to RLP.

abstract fun writeValue(value: Bytes!): Unit