private static String padString(final String rawVal,final int maxLen){
  final int length=rawVal.length();
  if (maxLen == length) {
    return rawVal;
  }
 else   if (maxLen < length) {
    return rawVal;
  }
 else {
    final StringBuilder paddedString=new StringBuilder();
    final int extraChars=maxLen - length;
    for (int jj=0; jj < extraChars; jj++) {
      paddedString.append('0');
    }
    paddedString.append(rawVal);
    return paddedString.toString();
  }
}

private static String padString ( final String rawVal , final int maxLen ) { final int length = rawVal . length ( ) ; if ( maxLen == length ) { return rawVal ; } else if ( maxLen < length ) { return rawVal ; } else { final StringBuilder paddedString = new StringBuilder ( ) ; final int extraChars = maxLen - length ; for ( int jj = 0 ; jj < extraChars ; jj ++ ) { paddedString . append ( '0' ) ; } paddedString . append ( rawVal ) ; return paddedString . toString ( ) ; } }
ensure any empty slots at start filled
