code: public static byte[] fromHex(String hexString) {
          byte[] result = null;
          if (hexString != null) {
              try {
                  // With thanks to StackOverflow:
                  // http://stackoverflow.com/questions/140131/convert-a-string-representation-of-a-hex-dump-to-a-byte-array-using-java
                  result = Hex.decodeHex(hexString.toCharArray());
              } catch (DecoderException e) {
                  throw new IllegalArgumentException("Could not parse this value as hex: " + hexString);
              }
          }
          return result;
      }
docs: Converts the given hex string to a byte array.
  <p>
  This is a convenience method useful for testing values during development.
  
  @param hexString The hex String to parse to bytes.
  @return A byte array, as parsed from the given String