mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Gaetan Boismal
04.40.2016 d387e01d387a12e04f7301fa4f84010e05e58760
opendj-sdk/opendj-cli/src/main/java/com/forgerock/opendj/cli/Utils.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2006-2010 Sun Microsystems, Inc.
 *      Portions copyright 2014-2015 ForgeRock AS.
 *      Portions copyright 2014-2016 ForgeRock AS.
 */
package com.forgerock.opendj.cli;
@@ -40,6 +40,7 @@
import java.net.UnknownHostException;
import java.security.GeneralSecurityException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.StringTokenizer;
import java.util.TimeZone;
@@ -619,4 +620,19 @@
    public static void printWrappedText(final PrintStream stream, final LocalizableMessage message) {
        printWrappedText(stream, message != null ? message.toString() : null);
    }
    /**
     * Repeats the given {@link char} n times.
     *
     * @param charToRepeat
     *      The {@link char} to repeat.
     * @param length
     *      The repetition count.
     * @return The given {@link char} n times.
     */
    public static String repeat(final char charToRepeat, final int length) {
        final char[] str = new char[length];
        Arrays.fill(str, charToRepeat);
        return new String(str);
    }
}