code: public static byte[] decodeHex(char[] hexData) {
  
  		int len = hexData.length;
  
  		if ((len & 0x01) != 0) {
  			throw new RuntimeException("Odd number of characters.");
  		}
  
  		byte[] out = new byte[len >> 1];
  
  		// two characters form the hex value.
  		for (int i = 0, j = 0; j < len; i++) {
  			int f = toDigit(hexData[j], j) << 4;
  			j++;
  			f = f | toDigit(hexData[j], j);
  			j++;
  			out[i] = (byte) (f & 0xFF);
  		}
  
  		return out;
  	}
docs: 将十六进制字符数组转换为字节数组
  
  @param hexData 十六进制char[]
  @return byte[]
  @throws RuntimeException 如果源十六进制字符数组是一个奇怪的长度，将抛出运行时异常