A UUID in the form of "b2f0da40ec2c11e00000242d50cf1fbf" has been transformed (see the following code segment) into a hex string as 6232663064613430656332633131653030303030323432643530636631666266. I want to code a reverse routine and get it back to the original format as in "b2f0...", but had a hard time to do so, any help?
byte[] bytes = uuid.getBytes("UTF-8");
StringBuilder hex = new StringBuilder(bytes.length* 2);
Formatter fmt = new Formatter(hex);
for (byte b : bytes)
fmt.format("%x", b);