decode static method

Implementation

static XdrRestoreFootprintResultCode decode(XdrDataInputStream stream) {
  int value = stream.readInt();
  switch (value) {
    case 0:
      return RESTORE_FOOTPRINT_SUCCESS;
    case -1:
      return RESTORE_FOOTPRINT_MALFORMED;
    case -2:
      return RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED;
    case -3:
      return RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE;
    default:
      throw Exception("Unknown enum value: $value");
  }
}