decode method
- XdrDataInputStream stream
Implementation
static XdrRevokeSponsorshipResultCode decode(XdrDataInputStream stream) {
int value = stream.readInt();
switch (value) {
case 0:
return REVOKE_SPONSORSHIP_SUCCESS;
case -1:
return REVOKE_SPONSORSHIP_DOES_NOT_EXIST;
case -2:
return REVOKE_SPONSORSHIP_NOT_SPONSOR;
case -3:
return REVOKE_SPONSORSHIP_LOW_RESERVE;
case -4:
return REVOKE_SPONSORSHIP_ONLY_TRANSFERABLE;
default:
throw Exception("Unknown enum value: $value");
}
}