code: private static <T extends Appendable> void recursiveAppendNumber(T result, int n,
              int radix, int minDigits)
      {
          try {
              int digit = n % radix;
  
              if (n >= radix || minDigits > 1) {
                  recursiveAppendNumber(result, n / radix, radix, minDigits - 1);
              }
              result.append(DIGITS[digit]);
          } catch (IOException e) {
              throw new IllegalIcuArgumentException(e);
          }
      }
docs: Append the digits of a positive integer to the given
  <code>Appendable</code> in the given radix. This is
  done recursively since it is easiest to generate the low-
  order digit first, but it must be appended last.
  
  @param result is the <code>Appendable</code> to append to
  @param n is the positive integer
  @param radix is the radix, from 2 to 36 inclusive
  @param minDigits is the minimum number of digits to append.