2016-10-21 81 views
0

我的長度值存儲在緩衝區accoreding到:從APDU響應獲得值

Short len=(short)128; 
buffer[1]=(byte)len 

在調試模式下我看到了緩衝區這個值:在Android應用 enter image description here

我得到這個APDU響應代碼

byte[] result=isodep.transceive(....)//... is Apdu command 

並得到結果1。 它是-128,但我想要128. 我該怎麼辦?

+0

[Java和unsigned Bytes]的可能重複(http://stackoverflow.com/questions/15073562/java-and- unsigned-bytes) –

回答

0

我寫了詮釋我=結果[1] & 0xFF和它的答案。