public void save(Common.IOutputStream destination, WalletSaveLevel saveLevel) { CryptoNote.BinaryOutputStreamSerializer s = new CryptoNote.BinaryOutputStreamSerializer(destination); byte saveLevelValue = (byte)saveLevel; s.functorMethod(saveLevelValue, "saveLevel"); saveKeyListAndBalances(s.functorMethod, saveLevel == WalletSaveLevel.SAVE_ALL); if (saveLevel == WalletSaveLevel.SAVE_KEYS_AND_TRANSACTIONS || saveLevel == WalletSaveLevel.SAVE_ALL) { saveTransactions(s.functorMethod); saveTransfers(s.functorMethod); } if (saveLevel == WalletSaveLevel.SAVE_ALL) { saveTransfersSynchronizer(s.functorMethod); saveUnlockTransactionsJobs(s.functorMethod); s.functorMethod(m_uncommitedTransactions, "uncommitedTransactions"); } s.functorMethod(m_extra, "extra"); }
public BinaryOutputStreamSerializer(Common.IOutputStream strm) { this.stream = new Common.IOutputStream(strm); }