public byte[] hex2byte(String hex) throws IllegalArgumentException { 
		if (hex.length() % 2 != 0) { 
		throw new IllegalArgumentException(); 
		} 
		char[] arr = hex.toCharArray(); 
		byte[] b = new byte[hex.length() / 2]; 
		for (int i = 0, j = 0, l = hex.length(); i < l; i++, j++) { 
		String swap = "" + arr[i++] + arr[i]; 
		int byteint = Integer.parseInt(swap, 16) & 0xFF; 
		b[j] = new Integer(byteint).byteValue(); 
		} 
		return b; 
	}