Skip to Main Content

Java Card

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Store array of objects in Java Card 2.2.1 platform

999263Apr 1 2013 — edited Apr 3 2013
Hi all,

I am new to smart card development and developing a demo e-wallet application using Java Card 2.2.1 SDK. I'd like to store last 10 transactions in card and create getter-setter methods. The structure of Transaction that i thought as follow:
public class Transaction {
	private byte type; // + or -
	private short amount;
	private byte[] date;
        ....
}
[Date format: "yyyy-MM-dd HH:mm:ss"]
And transactionList:
public class TransactionList {
	protected short currentIndex = (short) -1;
	protected Transaction [] list = new Transaction [10];
}
In my desktop application i have already called card's selectApplication(); / getBalance(); / setBalance(); / getWalletId(); / setWalletId(); methods. I need to create a method [getLastTransactions] in card project and call it from my desktop application.

<font size="2">How should I set up a structure for this issue?</font>

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on May 1 2013
Added on Apr 1 2013
1 comment
488 views