open fun <T : Any> readList(fn: Function<RLPReader, T>): T
(source)
Read a list of values from the RLP source.
fn
- A function that will be provided a RLPReader.
- The result type of the reading function.
InvalidRLPEncodingException
- If there is an error decoding the RLP source.
InvalidRLPTypeException
- If the next RLP value is not a list.
EndOfRLPException
- If there are no more RLP values to read.
Return
The result from the reading function.
abstract fun <T : Any> readList(lenient: Boolean, fn: Function<RLPReader, T>): T
(source)
Read a list of values from the RLP source.
lenient
- If false
, an exception will be thrown if the integer is not minimally encoded.
fn
- A function that will be provided a RLPReader.
- The result type of the reading function.
InvalidRLPEncodingException
- If there is an error decoding the RLP source.
InvalidRLPTypeException
- If the next RLP value is not a list.
EndOfRLPException
- If there are no more RLP values to read.
Return
The result from the reading function.
open fun readList(fn: BiConsumer<RLPReader, MutableList<Any>>): MutableList<Any>
(source)
Read a list of values from the RLP source, populating a mutable output list.
fn
- A function that will be provided with a RLPReader and a mutable output list.
InvalidRLPEncodingException
- If there is an error decoding the RLP source.
InvalidRLPTypeException
- If the next RLP value is not a list.
EndOfRLPException
- If there are no more RLP values to read.
Return
The list supplied to fn
.
open fun readList(lenient: Boolean, fn: BiConsumer<RLPReader, MutableList<Any>>): MutableList<Any>
(source)
Read a list of values from the RLP source, populating a mutable output list.
lenient
- If false
, an exception will be thrown if the integer is not minimally encoded.
fn
- A function that will be provided with a RLPReader and a mutable output list.
InvalidRLPEncodingException
- If there is an error decoding the RLP source.
InvalidRLPTypeException
- If the next RLP value is not a list.
EndOfRLPException
- If there are no more RLP values to read.
Return
The list supplied to fn
.