public char[] askSecret(final String question) { if (withColor) { write( console, false, Ansi.ansi() .fgBright(Ansi.Color.CYAN) .bold() .a(question + " ") .boldOff() .reset() .toString()); } else { write(console, false, question + " "); } return System.console().readPassword(); }
public String ask(final String question) { if (withColor) { write( console, false, Ansi.ansi() .fgBright(Ansi.Color.WHITE) .bold() .a(question + " ") .boldOff() .reset() .toString()); } else { write(console, false, question + " "); } return System.console().readLine(); }
public void log(final String value) { if (withLog) { write(console, true, withColor ? inColor(Color.YELLOW, value) : value); } }
public void show(final String... values) { write(console, true, values); }
public void error(final String value) { write(console, true, withColor ? inColor(Color.RED, value) : value); }
public void log(final char[] value, final int len) { if (withLog) { final String msg = new String(value, 0, len); write(console, false, withColor ? inColor(Color.YELLOW, msg) : msg); } }