public static void appendUnpaddedInteger(StringBuffer buf,long value){
  int intValue=(int)value;
  if (intValue == value) {
    appendUnpaddedInteger(buf,intValue);
  }
 else {
    buf.append(Long.toString(value));
  }
}

public static void appendUnpaddedInteger ( StringBuffer buf , long value ) { int intValue = ( int ) value ; if ( intValue == value ) { appendUnpaddedInteger ( buf , intValue ) ; } else { buf . append ( Long . toString ( value ) ) ; } }
converts an integer to a string , and appends it to the given buffer . < p > this method is optimized for converting small values to strings .
