code: public static final String getString(int index) {
  		StringBuffer buf = new StringBuffer();
  
  		// lower than 0 ? Add minus
  		if (index < 0) {
  			buf.append('-');
  			index = -index;
  		}
  
  		// greater than 3000
  		if (index > 3000) {
  			buf.append('|');
  			buf.append(getString(index / 1000));
  			buf.append('|');
  			// remainder
  			index = index - (index / 1000) * 1000;
  		}
  
  		// number between 1 and 3000
  		int pos = 0;
  		while (true) {
  			// loop over the array with values for m-d-c-l-x-v-i
  			RomanDigit dig = roman[pos];
  			// adding as many digits as we can
  			while (index >= dig.value) {
  				buf.append(dig.digit);
  				index -= dig.value;
  			}
  			// we have the complete number
  			if (index <= 0) {
  				break;
  			}
  			// look for the next digit that can be used in a special way
  			int j = pos;
  			while (!roman[++j].pre);
  
  			// does the special notation apply?
  			if (index + roman[j].value >= dig.value) {
  				buf.append(roman[j].digit).append(dig.digit);
  				index -= dig.value - roman[j].value;
  			}
  			pos++;
  		}
  		return buf.toString();
  	}
docs: Changes an int into a lower case roman number.
  @param index the original number
  @return the roman number (lower case)