code: private void fastZeroPaddingNumber(StringBuffer buf, int value, int minDigits, int maxDigits) {
          int limit = decimalBuf.length < maxDigits ? decimalBuf.length : maxDigits;
          int index = limit - 1;
          while (true) {
              decimalBuf[index] = decDigits[(value % 10)];
              value /= 10;
              if (index == 0 || value == 0) {
                  break;
              }
              index--;
          }
          int padding = minDigits - (limit - index);
          while (padding > 0 && index > 0) {
              decimalBuf[--index] = decDigits[0];
              padding--;
          }
          while (padding > 0) {
              // when pattern width is longer than decimalBuf, need extra
              // leading zeros - ticke#7595
              buf.append(decDigits[0]);
              padding--;
          }
          buf.append(decimalBuf, index, limit - index);
      }
docs: /*
  Lightweight zero padding integer number format function.
  
  Note: This implementation is almost equivalent to format method in DateNumberFormat.
  In the method zeroPaddingNumber above should be able to use the one in DateNumberFormat,
  but, it does not help IBM J9's JIT to optimize the performance much.  In simple repeative
  date format test case, having local implementation is ~10% faster than using one in
  DateNumberFormat on IBM J9 VM.  On Sun Hotspot VM, I do not see such difference.
  
  -Yoshito