Package org.beryx.textio.console
Class ConsoleTextTerminal
- java.lang.Object
-
- org.beryx.textio.AbstractTextTerminal<ConsoleTextTerminal>
-
- org.beryx.textio.console.ConsoleTextTerminal
-
- All Implemented Interfaces:
TextTerminal<ConsoleTextTerminal>
public class ConsoleTextTerminal extends AbstractTextTerminal<ConsoleTextTerminal>
ATextTerminal
backed by aConsole
.
-
-
Field Summary
-
Fields inherited from class org.beryx.textio.AbstractTextTerminal
DEFAULT_USER_INTERRUPT_KEY, SYSPROP_PROPERTIES_FILE_LOCATION
-
-
Constructor Summary
Constructors Constructor Description ConsoleTextTerminal()
ConsoleTextTerminal(java.io.Console console)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
println()
Terminates the current line by writing the line separator string.void
rawPrint(java.lang.String message)
Prints the message in its raw form.java.lang.String
read(boolean masking)
Reads a line of text-
Methods inherited from class org.beryx.textio.AbstractTextTerminal
addDefaultProperty, getDefaultProperties, getProperties, getPropertiesPrefixes, getPropertiesReader, init, initProperties, initProperties, initProperties
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.beryx.textio.TextTerminal
abort, applyWithPropertiesConfigurator, dispose, dispose, executeWithPropertiesConfigurator, executeWithPropertiesPrefix, moveToLineStart, print, print, printf, printf, println, println, rawPrint, registerHandler, registerUserInterruptHandler, resetLine, resetToBookmark, setBookmark
-
-
-
-
Method Detail
-
read
public java.lang.String read(boolean masking)
Description copied from interface:TextTerminal
Reads a line of text- Parameters:
masking
- true, if the input should be masked (for example to enter a password)- Returns:
- the entered text
-
rawPrint
public void rawPrint(java.lang.String message)
Description copied from interface:TextTerminal
Prints the message in its raw form. This method expects a single line of text. The behavior is undefined if the string contains line separators.
-
println
public void println()
Description copied from interface:TextTerminal
Terminates the current line by writing the line separator string.
-
-