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

Gaetan Boismal
17.29.2015 4e4b322332130bf466e3bdbd9cd7c4ca832d1049
opendj-cli/src/main/java/com/forgerock/opendj/cli/Utils.java
@@ -35,6 +35,7 @@
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.security.GeneralSecurityException;
@@ -612,4 +613,30 @@
        }
        return host;
    }
    /**
     * Prints the provided string on the provided stream.
     *
     * @param stream
     *            The stream to print the message.
     * @param message
     *            The message to print.
     */
    public static void printWrappedText(final PrintStream stream, final String message) {
        if (stream != null && message != null) {
            stream.println(wrapText(message, MAX_LINE_WIDTH));
        }
    }
    /**
     * Print the provided message on the provided stream.
     *
     * @param stream
     *            The stream to print the message.
     * @param message
     *            The message to print.
     */
    public static void printWrappedText(final PrintStream stream, final LocalizableMessage message) {
        printWrappedText(stream, message != null ? message.toString() : null);
    }
}