tuweni / org.apache.tuweni.ssz / SSZReader / readString

readString

open fun readString(): String! (source)

Read a string value from the SSZ source. Note: prefer to use #readString(int) instead, especially when reading untrusted data.

Exceptions

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

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

Return
String!: A string.

open fun readString(limit: Int): String! (source)

Read a string value from the SSZ source.

Parameters

limit - Int: The maximum number of bytes to read.

Exceptions

InvalidSSZTypeException - If the next SSZ value is not a byte array, or would exceed the limit.

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

Return
String!: A string.