ArrayList<Byte> hexStringToBinaryData(final String hex) { ArrayList<Byte> out = new ArrayList<Byte>(); for (int i = 0; i < hex.length(); i += 2) { out.add((byte) Integer.parseInt(hex.substring(i, i + 2), 16)); } return out; }
Programming Tips - Java: Convert a hex string into binary data
Date: 2015jul17
Language: Java
Keywords: hexadecimal
Q. Java: Convert a hex string into binary data
A.