String getBuffer(boolean color) {
    StringBuilder buf = new StringBuilder();
    for (Object part : parts) {
      if (!color && part instanceof ColorBuffer.ColorAttr) {
        continue;
      }
      buf.append(part.toString());
    }
    return buf.toString();
  }
Pad the specified String with spaces to the indicated length

@param str
         the String to pad
@param len
         the length we want the return String to be
@return the passed in String with spaces appended until the
        length matches the specified length.
beeline/src/java/org/apache/hive/beeline/ColorBuffer.java