decode method

XdrPathPaymentOp decode (
  1. XdrDataInputStream stream
)

Implementation

static XdrPathPaymentOp decode(XdrDataInputStream stream) {
  XdrPathPaymentOp decodedPathPaymentOp = XdrPathPaymentOp();
  decodedPathPaymentOp.sendAsset = XdrAsset.decode(stream);
  decodedPathPaymentOp.sendMax = XdrInt64.decode(stream);
  decodedPathPaymentOp.destination = XdrAccountID.decode(stream);
  decodedPathPaymentOp.destAsset = XdrAsset.decode(stream);
  decodedPathPaymentOp.destAmount = XdrInt64.decode(stream);
  int pathsize = stream.readInt();
  decodedPathPaymentOp.path = List<XdrAsset>(pathsize);
  for (int i = 0; i < pathsize; i++) {
    decodedPathPaymentOp.path[i] = XdrAsset.decode(stream);
  }
  return decodedPathPaymentOp;
}