if (useExponentialNotation) return format ((double) number, dest, fieldPos);  boolean is_neg = number < 0; if (is_neg) { if (negativePrefix != null) dest.append(negativePrefix); else { dest.append(symbols.getMinusSign()); dest.append(positivePrefix); } number = - number; } else dest.append(positivePrefix);  int integerBeginIndex = dest.length(); int index = dest.length(); int count = 0; while (count < maximumIntegerDigits && (number > 0 || count < minimumIntegerDigits)) { long dig = number % 10; number /= 10;   if (dig < 0) { dig = - dig; number = - number; }   if (groupingUsed && count > 0 && groupingSize != 0 && count % groupingSize == 0) dest.insert(index, symbols.getGroupingSeparator());  dest.insert(index, (char) (symbols.getZeroDigit() + dig));  ++count; }  if (fieldPos != null && fieldPos.getField() == INTEGER_FIELD) { fieldPos.setBeginIndex(integerBeginIndex); fieldPos.setEndIndex(dest.length()); }  if (decimalSeparatorAlwaysShown || minimumFractionDigits > 0) { dest.append(symbols.getDecimalSeparator()); if (fieldPos != null && fieldPos.getField() == FRACTION_FIELD) { fieldPos.setBeginIndex(dest.length()); fieldPos.setEndIndex(dest.length() + minimumFractionDigits); } }  for (count = 0; count < minimumFractionDigits; ++count) dest.append(symbols.getZeroDigit());  dest.append((is_neg && negativeSuffix != null) ? negativeSuffix : positiveSuffix);
formatInternal (number, new StringFormatBuffer(dest), fieldPos);
  public StringBuffer format (long number, StringBuffer dest,			      FieldPosition fieldPos)  {		// If using exponential notation, we just format as a double.		if (useExponentialNotation)       return format ((double) number, dest, fieldPos);		boolean is_neg = number < 0;    if (is_neg)      {			if (negativePrefix != null)				dest.append(negativePrefix);	else	  {				dest.append(symbols.getMinusSign());				dest.append(positivePrefix);			}	number = - number;      }    else			dest.append(positivePrefix);		int integerBeginIndex = dest.length();		int index = dest.length();		int count = 0;    while (count < maximumIntegerDigits	   && (number > 0 || count < minimumIntegerDigits))      {			long dig = number % 10;			number /= 10;			// NUMBER and DIG will be less than 0 if the original number			// was the most negative long.	if (dig < 0)	  {	    dig = - dig;	    number = - number;			}			// Append group separator if required.	if (groupingUsed && count > 0 && groupingSize != 0 && count % groupingSize == 0)				dest.insert(index, symbols.getGroupingSeparator());			dest.insert(index, (char) (symbols.getZeroDigit() + dig));			++count;		}    if (fieldPos != null && fieldPos.getField() == INTEGER_FIELD)      {			fieldPos.setBeginIndex(integerBeginIndex);			fieldPos.setEndIndex(dest.length());		}    if (decimalSeparatorAlwaysShown || minimumFractionDigits > 0)      {			dest.append(symbols.getDecimalSeparator());	if (fieldPos != null && fieldPos.getField() == FRACTION_FIELD)	  {				fieldPos.setBeginIndex(dest.length());				fieldPos.setEndIndex(dest.length() + minimumFractionDigits);			}		}		for (count = 0; count < minimumFractionDigits; ++count)			dest.append(symbols.getZeroDigit());    dest.append((is_neg && negativeSuffix != null)		? negativeSuffix		: positiveSuffix);		return dest;	}