public static String itostrx(int hex)
	{
		final int BASE = 16;
		final int ASCII_DIGITS = 48;
		final int ASCII_LETTERS = 55;
		final int CUTOFF = 10;
		String result = "";
		do{
			int remainder = (hex % BASE);
			if(remainder >= CUTOFF){// If it is a letter
				result = (char) (remainder + ASCII_LETTERS) + result;
			} else{ //if it is a normal digit.
				result = (char) ((hex % BASE) + ASCII_DIGITS) + result;
			}
			hex /= BASE;
		} while(hex > 0);
		return result;
	}