code: public static String pad(final StringBuffer buff, final String string,
              final int count)
     {
        for (int i = 0; i < count; i++)
        {
           buff.append(string);
        }
  
        return buff.toString();
     }
docs: Return a string padded with the given string for the given count.
  
  @param buff String buffer used for padding (buffer is not reset).
  @param string Pad element.
  @param count Pad count.
  @return Padded string.