interface RLPReader
(source)
A reader for consuming values from an RLP encoded source.
abstract fun isComplete(): Boolean
Check if all values have been read. |
|
abstract fun isLenient(): Boolean
Determine if this reader is lenient by default. A non-lenient reader will throw InvalidRLPEncodingException from any read method if the source RLP has not used a minimal encoding format for the value. |
|
abstract fun nextIsEmpty(): Boolean
Check if the next item to be read is empty. |
|
abstract fun nextIsList(): Boolean
Check if the next item to be read is a list. |
|
open fun readBigInteger(): BigInteger open fun readBigInteger(lenient: Boolean): BigInteger
Read a big integer value from the RLP source. |
|
open fun readByte(): Byte open fun readByte(lenient: Boolean): Byte
Read a byte from the RLP source. |
|
open fun readByteArray(): ByteArray
Read a byte array from the RLP source. |
|
open fun readInt(): Int open fun readInt(lenient: Boolean): Int
Read an integer value from the RLP source. |
|
open fun <T : Any> readList(fn: Function<RLPReader, T>): T abstract fun <T : Any> readList(lenient: Boolean, fn: Function<RLPReader, T>): T
Read a list of values from the RLP source. open fun readList(fn: BiConsumer<RLPReader, MutableList<Any>>): MutableList<Any> open fun readList(lenient: Boolean, fn: BiConsumer<RLPReader, MutableList<Any>>): MutableList<Any>
Read a list of values from the RLP source, populating a mutable output list. |
|
open fun <T : Any> readListContents(fn: Function<RLPReader, T>): MutableList<T> open fun <T : Any> readListContents(lenient: Boolean, fn: Function<RLPReader, T>): MutableList<T>
Read a list of values from the RLP source, populating a list using a function interpreting each value. |
|
open fun readLong(): Long open fun readLong(lenient: Boolean): Long
Read a long value from the RLP source. |
|
open fun readString(): String open fun readString(lenient: Boolean): String
Read a string value from the RLP source. |
|
open fun readUInt256(): UInt256 open fun readUInt256(lenient: Boolean): UInt256
Read a UInt256 value from the RLP source. |
|
open fun readValue(): Bytes abstract fun readValue(lenient: Boolean): Bytes
Read the next value from the RLP source. |
|
abstract fun remaining(): Int
The number of remaining values to read. |
|
open fun skipNext(): Unit abstract fun skipNext(lenient: Boolean): Unit
Skip the next value or list in the RLP source. |