Here you can find the source of indent(int level)
public static final String indent(int level)
//package com.java2s; //License from project: Apache License public class Main { public static final String indent(int level) { return indent(level, 4); }/*from w w w . j av a 2 s. c o m*/ public static final String indent(int level, int spaces) { StringBuilder result = new StringBuilder(); for (int i = 0; i < level; i++) { for (int j = 0; j < spaces; j++) { result.append(" "); } } return result.toString(); } }