Interface Terminal
- All Superinterfaces:
AutoCloseable, Closeable
Terminal interface providing access to terminal functionality.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceHandler for terminal signals. -
Method Summary
Modifier and TypeMethodDescriptiondevice()Get the terminal device for capability queries.booleanecho()Get the current echo state of the terminal.booleanecho(boolean echo) Set the echo state of the terminal.Get the terminal attributes.default Consumer<int[]> Get the code point consumer for this terminal.getName()Get the terminal name.getSize()Get the terminal size.handle(Signal signal, Terminal.SignalHandler handler) Register a signal handler for the specified signal.input()Get the terminal input stream.output()Get the terminal output stream.voidRaise a signal on this terminal.voidsetAttributes(Attributes attr) Set the terminal attributes.
-
Method Details
-
getName
-
handle
Register a signal handler for the specified signal.- Parameters:
signal- the signal to handlehandler- the handler to register- Returns:
- the previous handler, or null if none
-
raise
-
input
-
output
-
echo
boolean echo()Get the current echo state of the terminal.- Returns:
- true if echo is enabled
-
echo
boolean echo(boolean echo) Set the echo state of the terminal.- Parameters:
echo- true to enable echo- Returns:
- the previous echo state
-
getAttributes
-
setAttributes
Set the terminal attributes.- Parameters:
attr- the attributes to set
-
getSize
-
device
-
getCodePointConsumer
Get the code point consumer for this terminal.- Returns:
- the code point consumer, or null if none
-