I have a java program where a read a identitynumber. Like "1234567" Now i want to convert that ascii value to a hexadecimal value and put that in a hexadecimal byte array like this :
byte[] bytes = {0x02, 0x0b, 0x39, 0x36, 0x31, 0x31, 0x32, 0x36, 0x31, 0x39, 0x39, 0x34, 0x37, 0x32, 0x03};
Problem is .. I have no idea how that i can do that .. Have you a solution or tips ? Thanks !
String foo = receivedData.substring(10,21);
BigInteger data = new BigInteger(foo);