public static Transaction decode(XdrDataInputStream stream) throws IOException { Transaction decodedTransaction = new Transaction(); decodedTransaction.sourceAccount = AccountID.decode(stream); decodedTransaction.fee = Uint32.decode(stream); decodedTransaction.seqNum = SequenceNumber.decode(stream); int timeBoundsPresent = stream.readInt(); if (timeBoundsPresent != 0) { decodedTransaction.timeBounds = TimeBounds.decode(stream); } decodedTransaction.memo = Memo.decode(stream); int operationssize = stream.readInt(); decodedTransaction.operations = new Operation[operationssize]; for (int i = 0; i < operationssize; i++) { decodedTransaction.operations[i] = Operation.decode(stream); } decodedTransaction.ext = TransactionExt.decode(stream); return decodedTransaction; }
public static TransactionExt decode(XdrDataInputStream stream) throws IOException { TransactionExt decodedTransactionExt = new TransactionExt(); Integer discriminant = stream.readInt(); decodedTransactionExt.setDiscriminant(discriminant); switch (decodedTransactionExt.getDiscriminant()) { case 0: break; } return decodedTransactionExt; }