Here you can find the source of indent(StringBuilder builder, int times)
public static void indent(StringBuilder builder, int times)
//package com.java2s; /*/* www .j a v a 2 s.c o m*/ * Copyright 2013 Red Hat, Inc. and/or its affiliates. * * Licensed under the Eclipse Public License version 1.0, available at * http://www.eclipse.org/legal/epl-v10.html */ public class Main { public static final String INDENT = " "; /** * Does the same thing as {@link #indent(int)} but appends it directly to string builder. */ public static void indent(StringBuilder builder, int times) { for (int i = 0; i < times; i++) { builder.append(INDENT); } } /** * Returns {@link #INDENT} "times" times. */ public static String indent(int times) { StringBuilder builder = new StringBuilder(INDENT.length() * times); indent(builder, times); return builder.toString(); } }