| Modifier and Type | Field and Description |
|---|---|
private java.io.PrintStream |
errWriter |
private java.io.InputStream |
in |
private ConsoleInputSession |
input |
private java.io.PrintStream |
outWriter |
private TerminalSize |
size |
| Constructor and Description |
|---|
TestTerminal() |
| Modifier and Type | Method and Description |
|---|---|
void |
changeOutputStream(java.io.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.
|
java.io.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
|
java.io.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(java.lang.String data) |
private java.io.PrintStream outWriter
private java.io.PrintStream errWriter
private TerminalSize size
private ConsoleInputSession input
private java.io.InputStream in
public void init(Settings settings)
Terminalpublic int[] read()
throws java.io.IOException
Terminalpublic boolean hasInput()
Terminalpublic TerminalSize getSize()
public CursorPosition getCursor()
public void setCursor(CursorPosition cp)
Shellpublic void moveCursor(int r,
int c)
ShellmoveCursor in interface Shellpublic boolean isMainBuffer()
isMainBuffer in interface Shellpublic void enableAlternateBuffer()
ShellenableAlternateBuffer in interface Shellpublic void enableMainBuffer()
ShellenableMainBuffer in interface Shellpublic boolean isEchoEnabled()
isEchoEnabled in interface Terminalpublic void reset()
throws java.io.IOException
Terminalpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionpublic void clear()
throws java.io.IOException
Shellpublic java.io.PrintStream err()
ShellPrintStream associated with the std errpublic AeshStandardStream in()
Shellpublic java.io.PrintStream out()
ShellPrintStream associated with the std outpublic void writeToInputStream(java.lang.String data)
writeToInputStream in interface Terminalpublic void changeOutputStream(java.io.PrintStream output)
TerminalchangeOutputStream in interface Terminaloutput - stream