public class POSIXTerminal extends AbstractTerminal
settings| Constructor and Description |
|---|
POSIXTerminal() |
| Modifier and Type | Method and Description |
|---|---|
void |
changeOutputStream(PrintStream output)
During runtime, change the output stream
|
void |
close() |
PrintStream |
err()
Returns the
PrintStream associated with the std err |
TerminalSize |
getSize() |
boolean |
hasInput()
Check if the terminal has input waiting to be read.
|
void |
init(Settings settings)
Initialize the Terminal with which input/output stream it should use
|
boolean |
isEchoEnabled() |
PrintStream |
out()
Returns the
PrintStream associated with the std out |
int[] |
read()
Read from the input stream (char by char)
|
void |
reset()
Set it back to normal when we exit
|
protected static String |
stty(String args)
Run stty with arguments on the active terminal
|
void |
writeToInputStream(String data) |
clear, enableAlternateBuffer, enableMainBuffer, getCursor, getShell, in, isMainBuffer, moveCursor, setCursorpublic void init(Settings settings)
Terminalpublic int[] read()
throws IOException
TerminalIOExceptionTerminalpublic boolean hasInput()
Terminalpublic TerminalSize getSize()
public boolean isEchoEnabled()
Terminalpublic void reset()
throws IOException
TerminalIOException - streamTerminalpublic void writeToInputStream(String data)
public void changeOutputStream(PrintStream output)
Terminaloutput - streampublic void close()
throws IOException
IOExceptionprotected static String stty(String args) throws IOException, InterruptedException
args - argumentsIOException - streamInterruptedException - streampublic PrintStream err()
ShellPrintStream associated with the std errpublic PrintStream out()
ShellPrintStream associated with the std outCopyright © 2024 JBoss by Red Hat. All rights reserved.