I'm trying to copy two Byte arrays into another. The problem is that the first element of the result Byte is strange, I get 0xFFFFFF80 instead of 0x80. the code I'm using is:
this.IC_SUBMIT_APDU = new byte[13];
byte[] prefix = {
(byte) 0x80,
(byte) 0x20,
(byte) 0x07,
(byte) 0x00,
(byte) 0x08
};
System.arraycopy(prefix , 0, this.IC_SUBMIT_APDU, 0, prefix.length);
for(int i=0; i<this.IC_SUBMIT_APDU.length ; i++)
System.out.println("" + Integer.toHexString(this.IC_SUBMIT_APDU[i]));
when I give it this argument:
{
(byte) 0x41,
(byte) 0x43,
(byte) 0x4F,
(byte) 0x53,
(byte) 0x54,
(byte) 0x45,
(byte) 0x53,
(byte) 0x54
}
it produces the following result:
ffffff80
20
7
0
8
0
0
0
0
0
0
0
0
WHy do I get that 0xFFFFFF80 ? am I not supposed to get 0x80 ??
80 FF FF FF. As said mattm in his answer, theFFFFFFpart comes from somewhere else or is filler.