private static void padInt ( StringBuilder buffer , int value , int length ) { String strValue = Integer . toString ( value ) ; for ( int i = length - strValue . length ( ) ; i > 0 ; i -- ) { buffer . append ( ' ' ) ; } buffer . append ( strValue ) ; }
Zero pad a number to a specified length