decode method Null safety
- XdrDataInputStream stream
Implementation
static XdrHostFunctionType decode(XdrDataInputStream stream) {
int value = stream.readInt();
switch (value) {
case 0:
return HOST_FUNCTION_TYPE_INVOKE_CONTRACT;
case 1:
return HOST_FUNCTION_TYPE_CREATE_CONTRACT;
case 2:
return HOST_FUNCTION_TYPE_INSTALL_CONTRACT_CODE;
default:
throw Exception("Unknown enum value: $value");
}
}