我无法在字节数组中的 128 以上索引处写入数据。代码如下。
private void Write1(APDU apdu) throws ISOException
{
apdu.setIncomingAndReceive();
byte[] apduBuffer = apdu.getBuffer();
byte j = (byte)apduBuffer[4]; // Return incoming bytes lets take 160
Buffer1 = new byte[j]; // initialize a array with size 160
for (byte i=0; i<j; i++)
Buffer1[(byte)i] = (byte)apduBuffer[5+i];
}
它给了我错误 6F 00(这意味着到达文件结尾)。
我在用:
- 智能卡类型 = 联系卡
- 使用 java 卡 2.2.2 和 jcop 使用 apdu