JavacardOS will not accept order any more, please contact our partner Feitian online Store:
https://ftsafe.en.alibaba.com/index.html

In java card, how to convert byte to short?

JavaCard Applet Development Related Questions and Answers.
gorgekin
Posts: 20
Joined: Sun Nov 29, 2015 4:38 am
Points :83
Contact:

In java card, how to convert byte to short?

Post by gorgekin » Sat Dec 12, 2015 3:40 am

There are only small kinds of data types in java card. Now I am trying to convert data stored in a single byte type to short type. Ho can I do this? Is this the same as Java language?

kuafu
Posts: 317
Joined: Thu Jun 25, 2015 2:09 am
Points :4563
Contact:

Re: In java card, how to convert byte to short?

Post by kuafu » Sat Dec 12, 2015 4:33 am

Yes.
well

User avatar
UNKNwYSHSA
Posts: 630
Joined: Thu May 21, 2015 4:05 am
Points :3055
Contact:

Re: In java card, how to convert byte to short?

Post by UNKNwYSHSA » Sun Dec 13, 2015 9:55 pm

Code from one opensource project:

Code: Select all

short ss = Util.makeShort((byte)0x00, (byte)bb);
sense and simplicity

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 27 guests

JavaCard OS : Disclaimer