private static String convert(String text) {
		StringBuffer converted = new StringBuffer(text.length());
		for (int i = 0; i < text.length(); i++) {
			char c = text.charAt(i);
			if (((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')) ||
					((c >= '0') && (c <= '9'))) {
				converted.append(c);
			}
			else {
				converted.append('%');
				converted.append(Integer.toHexString((int) c));
			}
		}
		return converted.toString();
	}