tuweni / org.apache.tuweni.ssz / SSZReader / readVector

readVector

open fun readVector(listSize: Long): MutableList<Bytes!>! (source)

Read a known-size fixed-length list of Bytes from the SSZ source. The list WILL NOT have a length mixin, where as the elements WILL. Note: prefer to use #readVector(long, int) instead, especially when reading untrusted data.

Parameters

listSize - Long: The size of the fixed-length list being read.

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<Bytes!>!: A list of Bytes.

abstract fun readVector(listSize: Long, limit: Int): MutableList<Bytes!>! (source)

Read a known-size fixed-length list of Bytes from the SSZ source.

Parameters

listSize - Long: The size of the fixed-length list being read.

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<Bytes!>!: A list of Bytes.