flink-instrumentation/workspace/flink-1.4.1-instrumented/flink-1.4.1/flink-core/src/main/java/org/apache/flink/util/StringUtils.java
/**
	 * Given a hex string this will return the byte array corresponding to the
	 * string .
	 * 
	 * @param hex
	 *        the hex String array
	 * @return a byte array that is a hex string representation of the given
	 *         string. The size of the byte array is therefore hex.length/2
	 */
Given a hex string this will return the byte array corresponding to the
string .

@param hex
the hex String array
@return a byte array that is a hex string representation of the given
string. The size of the byte array is therefore hex.length/2
Given a hex string this will return the byte array corresponding to the string . @param hex the hex String array @return a byte array that is a hex string representation of the given string . The size of the byte array is therefore hex . length / 2
public static byte[] hexStringToByte(final String hex) {
		final byte[] bts = new byte[hex.length() / 2];
		for (int i = 0; i < bts.length; i++) {
			bts[i] = (byte) Integer.parseInt(hex.substring(2 * i, 2 * i + 2), 16);
		}
		return bts;
	}
public static byte [ ] hexStringToByte ( final String hex ) { final byte [ ] bts = new byte [ hex . length ( ) / 2 ] ; for ( int i = 0 ; i < bts . length ; i ++ ) { bts [ i ] = ( byte ) Integer . parseInt ( hex . substring ( 2 * i , 2 * i + 2 ) , 16 ) ; } return bts ; }
Given a hex string this will return the byte array corresponding to the
 string .
Given a hex string this will return the byte array corresponding to the string .