tuweni / org.apache.tuweni.ssz / SSZReader

SSZReader

interface SSZReader (source)

A reader for consuming values from an SSZ encoded source.

Functions

isComplete

Check if all values have been read.

abstract fun isComplete(): Boolean

readAddress

Read a 20-byte address from the SSZ source.

abstract fun readAddress(): Bytes!

readAddressList

Read a list of 20-byte addresses from the SSZ source.

abstract fun readAddressList(): MutableList<Bytes!>!

readBigInteger

Read a big integer value from the SSZ source.

abstract fun readBigInteger(bitLength: Int): BigInteger!

readBigIntegerList

Read a list of two's-compliment big integer values from the SSZ source.

abstract fun readBigIntegerList(bitLength: Int): MutableList<BigInteger!>!

readBoolean

Read a boolean from the SSZ source.

open fun readBoolean(): Boolean

readBooleanList

Read a list of booleans from the SSZ source.

abstract fun readBooleanList(): MutableList<Boolean!>!

readByteArray

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

open fun readByteArray(): ByteArray!

Read a byte array from the SSZ source.

open fun readByteArray(limit: Int): ByteArray!

readByteArrayList

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

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

Read a list of byte arrays from the SSZ source.

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

readBytes

Read bytes from the SSZ source. Note: prefer to use #readBytes(int) instead, especially when reading untrusted data.

open fun readBytes(): Bytes!

Read bytes from the SSZ source.

abstract fun readBytes(limit: Int): Bytes!

readBytesList

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

open fun readBytesList(): MutableList<Bytes!>!

Read a list of Bytes from the SSZ source.

abstract fun readBytesList(limit: Int): MutableList<Bytes!>!

readFixedByteArray

Read an array of fixed-length homogenous Bytes from the SSZ source.

open fun readFixedByteArray(byteLength: Int, limit: Int): ByteArray!

readFixedBytes

Read a known size fixed-length bytes value from the SSZ source. Note: prefer to use #readFixedBytes(int, int) instead, especially when reading untrusted data.

open fun readFixedBytes(byteLength: Int): Bytes!

Read a known size fixed-length bytes value from the SSZ source.

abstract fun readFixedBytes(byteLength: Int, limit: Int): Bytes!

readFixedBytesList

Read a list of known-size fixed length Bytes from the SSZ source. A length mixin IS expected for the list, but IS NOT expected for the list elements.

abstract fun readFixedBytesList(byteLength: Int, limit: Int): MutableList<Bytes!>!

Read a variable-length list of known-size fixed length Bytes from the SSZ source. Note: prefer to use #readFixedBytesList(int, int) instead, especially when reading untrusted data.

open fun readFixedBytesList(byteLength: Int): MutableList<Bytes!>!

readFixedBytesVector

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

abstract fun readFixedBytesVector(listSize: Int, byteLength: Int, limit: Int): MutableList<Bytes!>!

Read a known-size fixed length list of known-size fixed length Bytes from the SSZ source. Note: prefer to use #readFixedBytesVector(int, int, int) instead, especially when reading untrusted data.

open fun readFixedBytesVector(listSize: Int, byteLength: Int): MutableList<Bytes!>!

readHash

Read a hash from the SSZ source.

abstract fun readHash(hashLength: Int): Bytes!

readHashList

Read a list of hashes from the SSZ source.

abstract fun readHashList(hashLength: Int): MutableList<Bytes!>!

readInt

Read a two's-compliment int value from the SSZ source.

abstract fun readInt(bitLength: Int): Int

readInt16

Read a 16-bit two's-compliment integer from the SSZ source.

open fun readInt16(): Int

readInt16List

Read a list of 16-bit two's-compliment int values from the SSZ source.

open fun readInt16List(): MutableList<Int!>!

readInt32

Read a 32-bit two's-compliment integer from the SSZ source.

open fun readInt32(): Int

readInt32List

Read a list of 32-bit two's-compliment int values from the SSZ source.

open fun readInt32List(): MutableList<Int!>!

readInt64

Read a 64-bit two's-compliment integer from the SSZ source.

open fun readInt64(): Long

readInt64List

Read a list of 64-bit two's-compliment int values from the SSZ source.

open fun readInt64List(): MutableList<Long!>!

readInt8

Read an 8-bit two's-compliment integer from the SSZ source.

open fun readInt8(): Int

readInt8List

Read a list of 8-bit two's-compliment int values from the SSZ source.

open fun readInt8List(): MutableList<Int!>!

readIntList

Read a list of two's-compliment int values from the SSZ source.

abstract fun readIntList(bitLength: Int): MutableList<Int!>!

readLong

Read a two's-compliment long value from the SSZ source.

abstract fun readLong(bitLength: Int): Long

readLongIntList

Read a list of two's-compliment long int values from the SSZ source.

abstract fun readLongIntList(bitLength: Int): MutableList<Long!>!

readString

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

open fun readString(): String!

Read a string value from the SSZ source.

open fun readString(limit: Int): String!

readStringList

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

open fun readStringList(): MutableList<String!>!

Read a list of strings from the SSZ source.

abstract fun readStringList(limit: Int): MutableList<String!>!

readUInt

Read an unsigned int value from the SSZ source.

open fun readUInt(bitLength: Int): Int

readUInt16

Read a 16-bit unsigned integer from the SSZ source.

open fun readUInt16(): Int

readUInt16List

Read a list of 16-bit unsigned int values from the SSZ source.

open fun readUInt16List(): MutableList<Int!>!

readUInt256

Read a UInt256 from the SSZ source.

abstract fun readUInt256(): UInt256!

readUInt256List

Read a list of 256-bit unsigned int values from the SSZ source.

abstract fun readUInt256List(): MutableList<UInt256!>!

readUInt32

Read a 32-bit unsigned integer from the SSZ source.

open fun readUInt32(): Long

readUInt32List

Read a list of 32-bit unsigned int values from the SSZ source.

open fun readUInt32List(): MutableList<Long!>!

readUInt384

Read a UInt384 from the SSZ source.

abstract fun readUInt384(): UInt384!

readUInt384List

Read a list of 384-bit unsigned int values from the SSZ source.

abstract fun readUInt384List(): MutableList<UInt384!>!

readUInt64

Read a 64-bit unsigned integer from the SSZ source.

open fun readUInt64(): Long

readUInt64List

Read a list of 64-bit unsigned int values from the SSZ source.

open fun readUInt64List(): MutableList<Long!>!

readUInt8

Read an 8-bit unsigned integer from the SSZ source.

open fun readUInt8(): Int

readUInt8List

Read a list of 8-bit unsigned int values from the SSZ source.

open fun readUInt8List(): MutableList<Int!>!

readUIntList

Read a list of unsigned int values from the SSZ source.

open fun readUIntList(bitLength: Int): MutableList<Int!>!

readULong

Read an unsigned long value from the SSZ source.

open fun readULong(bitLength: Int): Long

readULongIntList

Read a list of unsigned long int values from the SSZ source.

open fun readULongIntList(bitLength: Int): MutableList<Long!>!

readUnsignedBigInteger

Read an unsigned big integer value from the SSZ source.

abstract fun readUnsignedBigInteger(bitLength: Int): BigInteger!

readUnsignedBigIntegerList

Read a list of unsigned big integer values from the SSZ source.

abstract fun readUnsignedBigIntegerList(bitLength: Int): MutableList<BigInteger!>!

readVector

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.

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

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

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