public static byte[] asciiHexToBytes(String hex) throws DecoderException {
  return Hex.decodeHex(hex.toCharArray());
}

public static byte [ ] asciiHexToBytes ( String hex ) throws DecoderException { return Hex . decodeHex ( hex . toCharArray ( ) ) ; }
convert a string of ascii hex characters ( e . g . " deadbeef0042 " ) to an array of bytes the hex represents ( e . g . [ 0xde , 0xad , 0xbe , 0xef , 0x00 , 0x42 ] ) . treat bytes returned by this method as unsigned .
