Package org.beryx.textio.system
Class SystemTextTerminal
- java.lang.Object
-
- org.beryx.textio.AbstractTextTerminal<SystemTextTerminal>
-
- org.beryx.textio.system.SystemTextTerminal
-
- All Implemented Interfaces:
TextTerminal<SystemTextTerminal>
public class SystemTextTerminal extends AbstractTextTerminal<SystemTextTerminal>
ATextTerminal
implemented usingSystem.out
,System.in
andScanner
. It is not capable to mask input strings, therefore not recommended when reading sensitive data.
-
-
Field Summary
-
Fields inherited from class org.beryx.textio.AbstractTextTerminal
DEFAULT_USER_INTERRUPT_KEY, SYSPROP_PROPERTIES_FILE_LOCATION
-
-
Constructor Summary
Constructors Constructor Description SystemTextTerminal()
-
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.
-
-