tuweni / org.apache.tuweni.ssz / SSZReader / readByteArrayList

readByteArrayList

open fun readByteArrayList(): MutableList<ByteArray!>! (source)

Read a list of byte arrays from the SSZ source. Note: prefer to use #readByteArrayList(int) instead, especially when reading untrusted data.

Exceptions

InvalidSSZTypeException - If the next SSZ value is not a list, any value in the list is not a byte array, or any byte array is too large (greater than 2^32 bytes).

EndOfSSZException - If there are no more SSZ values to read.

Return
MutableList<ByteArray!>!: A list of byte arrays.

open fun readByteArrayList(limit: Int): MutableList<ByteArray!>! (source)

Read a list of byte arrays from the SSZ source.

Parameters

limit - Int: The maximum number of bytes to read for each list element.

Exceptions

InvalidSSZTypeException - If the next SSZ value is not a list, any value in the list is not a byte array, or the size of any byte array would exceed the limit.

EndOfSSZException - If there are no more SSZ values to read.

Return
MutableList<ByteArray!>!: A list of byte arrays.