public interface Terminals extends NativeIntegration
On UNIX based platforms, this provides access to the terminal. On Windows platforms, this provides access to the console.
To create an instance of this interface use the Native.get(Class) method.
| Modifier and Type | Interface and Description |
|---|---|
static class |
Terminals.Output
System outputs.
|
| Modifier and Type | Method and Description |
|---|---|
TerminalOutput |
getTerminal(Terminals.Output output)
Returns the terminal attached to the given output.
|
TerminalInput |
getTerminalInput()
Returns the terminal attached to system input
|
boolean |
isTerminal(Terminals.Output output)
Returns true if the given output is attached to a terminal.
|
boolean |
isTerminalInput()
Returns true if the system input is attached to a terminal.
|
Terminals |
withAnsiOutput()
Returns a copy of this terminal access that forces terminal output to use ANSI escape sequences.
|
Terminals withAnsiOutput()
Terminal input is not changed.
boolean isTerminal(Terminals.Output output) throws NativeException
NativeException - On failure.boolean isTerminalInput()
throws NativeException
NativeExceptionTerminalOutput getTerminal(Terminals.Output output) throws NativeException
NativeException - When the output is not attached to a terminal.TerminalInput getTerminalInput() throws NativeException
NativeException - When the output is not attached to a terminal.