Constructor and Description |
---|
TestTerminal() |
Modifier and Type | Method and Description |
---|---|
void |
changeOutputStream(PrintStream output)
During runtime, change the output stream
|
void |
clear()
clears the screen
|
void |
close() |
void |
enableAlternateBuffer()
If not alternate buffer is enabled this will enable it
|
void |
enableMainBuffer()
If not main buffer is enabled this will enable it.
|
PrintStream |
err()
Returns the
PrintStream associated with the std err |
CursorPosition |
getCursor() |
Shell |
getShell() |
TerminalSize |
getSize() |
boolean |
hasInput()
Check if the terminal has input waiting to be read.
|
AeshStandardStream |
in()
Get the possible input stream
|
void |
init(Settings settings)
Initialize the Terminal with which input/output stream it should use
|
boolean |
isEchoEnabled() |
boolean |
isMainBuffer() |
void |
moveCursor(int r,
int c)
Move the cursor relative to the current position
Will not move outside of TerminalSize boundaries
|
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
|
void |
setCursor(CursorPosition cp)
Set cursor position
|
void |
writeToInputStream(String data) |
public void init(Settings settings)
Terminal
public int[] read() throws IOException
Terminal
read
in interface Terminal
IOException
public boolean hasInput()
Terminal
public TerminalSize getSize()
public CursorPosition getCursor()
public void setCursor(CursorPosition cp)
Shell
public void moveCursor(int r, int c)
Shell
moveCursor
in interface Shell
public boolean isMainBuffer()
isMainBuffer
in interface Shell
public void enableAlternateBuffer()
Shell
enableAlternateBuffer
in interface Shell
public void enableMainBuffer()
Shell
enableMainBuffer
in interface Shell
public boolean isEchoEnabled()
isEchoEnabled
in interface Terminal
public void reset() throws IOException
Terminal
reset
in interface Terminal
IOException
- streampublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public void clear() throws IOException
Shell
clear
in interface Shell
IOException
public PrintStream err()
Shell
PrintStream
associated with the std errpublic AeshStandardStream in()
Shell
public PrintStream out()
Shell
PrintStream
associated with the std outpublic void writeToInputStream(String data)
writeToInputStream
in interface Terminal
public void changeOutputStream(PrintStream output)
Terminal
changeOutputStream
in interface Terminal
output
- streamCopyright © 2017 JBoss by Red Hat. All rights reserved.