code: 	private static byte[] toUtf8Bytes(String str)
  	{
  		try
  		{
  			return str.getBytes("UTF-8");
  		}
  		catch(UnsupportedEncodingException e)
  		{
  			throw new IllegalStateException("The Java spec requires UTF-8 support.", e);
  		}
  	}
  
  	/**
  	 * Append the two upper case hex characters for a byte.
  	 * @param sb The string buffer to append to.
  	 * @param b The byte to hexify
  	 * @return sb with the hex characters appended.
  	 */
  	// rfc3986 2.1: For consistency, URI producers 
  	// should use uppercase hexadecimal digits for all percent-
  	// encodings.
  