class HexUtils {

    public static byte[] hexStringToByteArray(final String s) {
        int sizeInt = s.length() / 2;
        byte[] returnArray = new byte[sizeInt];
        String byteVal;
        for (int i = 0; i < sizeInt; i++) {
            int index = 2 * i;
            byteVal = s.substring(index, index + 2);
            returnArray[i] = (byte) (Integer.parseInt(byteVal, HEX_BASIS));
        }
        return returnArray;
    }

    private  HexUtils();

}