decode static method

XdrContractEventType decode(
  1. XdrDataInputStream stream
)

Implementation

static XdrContractEventType decode(XdrDataInputStream stream) {
  int value = stream.readInt();
  switch (value) {
    case 0:
      return CONTRACT_EVENT_TYPE_SYSTEM;
    case 1:
      return CONTRACT_EVENT_TYPE_CONTRACT;
    case 2:
      return CONTRACT_EVENT_TYPE_DIAGNOSTIC;
    default:
      throw Exception("Unknown enum value: $value");
  }
}