My receiving server side is expecting this field to be in bytes (8 byte). below is how i pack the F52 after computing the pinblock. which is 16 in Hexadecimal isomsg.setValue(52,CryptoUtils.hexToBytes(pinBlock), IsoType.BINARY, 8); this is computed pinBlock=E2F347C04A59634D from client in hex below is the recived data on server side in binary in bitmap represetantion, unfortunately the pinblock is received as its in HEX i was expcting something like e2 f3 47 c0 4a 59 63 4d which is in bytes[8]. the...
How to Parse Binary Field such as Field 52 (PIN BLOCK)
this is what i have, not sure if is the best public void run() { byte[] lenbuf = new byte[2]; try { while (this.ws_sock != null && this.ws_sock.isConnected() && Thread.currentThread().isAlive() && !Thread.currentThread().isInterrupted()) { if (this.ws_sock.getInputStream().read(lenbuf) == 2) { int size = ((lenbuf[0] & 0xff) << 8) | (lenbuf[1] & 0xff); byte[] buf = new byte[size]; if (ws_sock == null) { ws_sock = ws_sock2; } // We're not expecting ETX in this case this.ws_sock.getInputStream().read(buf);...