0
我的長度值存儲在緩衝區accoreding到:從APDU響應獲得值
Short len=(short)128;
buffer[1]=(byte)len
我得到這個APDU響應代碼
byte[] result=isodep.transceive(....)//... is Apdu command
並得到結果1。 它是-128,但我想要128. 我該怎麼辦?
我的長度值存儲在緩衝區accoreding到:從APDU響應獲得值
Short len=(short)128;
buffer[1]=(byte)len
我得到這個APDU響應代碼
byte[] result=isodep.transceive(....)//... is Apdu command
並得到結果1。 它是-128,但我想要128. 我該怎麼辦?
我寫了詮釋我=結果[1] & 0xFF和它的答案。
[Java和unsigned Bytes]的可能重複(http://stackoverflow.com/questions/15073562/java-and- unsigned-bytes) –