Package open.java.toolkit.console
Class Console
- java.lang.Object
-
- open.java.toolkit.console.Console
-
public class Console extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Console()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidansiWrite(java.lang.String ansiStart, java.lang.String text, LogType type)Writes text to the console, with ANSI color.static voidansiWriteLine(java.lang.String ansiStart, java.lang.String text, LogType type)Writes a line to the console, with ANSI color.static voidclear()Clears the console.static java.lang.StringreadLine()Reads a line from the console input.static voidsetTitle(java.lang.String text)Sets the title of the terminal.static voidwrite(java.lang.String text, LogType type)Writes text to the console.static voidwriteLine(java.lang.String text, LogType type)Writes a line to the console.
-
-
-
Method Detail
-
writeLine
public static void writeLine(java.lang.String text, LogType type)Writes a line to the console.- Parameters:
text- The text to write.type- The type of log.
-
write
public static void write(java.lang.String text, LogType type)Writes text to the console.- Parameters:
text- The text to write.type- The type of log.
-
ansiWriteLine
public static void ansiWriteLine(java.lang.String ansiStart, java.lang.String text, LogType type)Writes a line to the console, with ANSI color.- Parameters:
ansiStart- The ANSI color code.text- The text to write.type- The type of log.
-
ansiWrite
public static void ansiWrite(java.lang.String ansiStart, java.lang.String text, LogType type)Writes text to the console, with ANSI color.- Parameters:
ansiStart- The ANSI color code.text- The text to write.type- The type of log.
-
clear
public static void clear()
Clears the console.
-
setTitle
public static void setTitle(java.lang.String text)
Sets the title of the terminal.- Parameters:
text- The title to set.
-
readLine
public static java.lang.String readLine()
Reads a line from the console input.- Returns:
- The latest line from the console input, if any.
-
-