tuweni / org.apache.tuweni.ssz / SSZ / decodeByteArrayList

decodeByteArrayList

static fun decodeByteArrayList(source: Bytes!): MutableList<ByteArray!>! (source)

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

Parameters

source - Bytes!: the SSZ encoded bytes

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

static fun decodeByteArrayList(source: Bytes!, limit: Int): MutableList<ByteArray!>! (source)

Read a list of byte arrays from the SSZ source.

Parameters

source - Bytes!: the SSZ encoded bytes

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 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