I have a String str = "0x01".
I want to convert this string into byte exactly as it is.
I tried doing str.getBytes() and EncodingUtils.getAsciiBytes(str) but it gives byte value of each character I suppose.
I want byte variable to have value as 0x01.
Any idea how do we do it?
Thanks