| Constructor and Description |
|---|
TestTerminal() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
clears the screen
|
CursorPosition |
getCursor() |
TerminalSize |
getSize() |
void |
init(InputStream inputStream,
OutputStream stdOut,
OutputStream stdErr)
Initialize the Terminal with which input/output stream it should use
|
boolean |
isEchoEnabled() |
void |
moveCursor(int r,
int c)
Move the cursor relative to the current position
Will not move outside of TerminalSize boundaries
|
int[] |
read(boolean readAhead)
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 |
writeChar(TerminalCharacter character)
Write a TerminalCharacter to std out
|
void |
writeChars(List<TerminalCharacter> chars)
Write a list of TerminalCharacters to std out
|
void |
writeToStdErr(char err)
Write to the standard error stream
|
void |
writeToStdErr(char[] err)
Write to the standard error stream
|
void |
writeToStdErr(String err)
Write to the standard error stream
|
void |
writeToStdOut(char out)
Write to the standard output stream
|
void |
writeToStdOut(char[] out)
Write to the standard output stream
|
void |
writeToStdOut(String out)
Write to the standard output stream
|
public void init(InputStream inputStream, OutputStream stdOut, OutputStream stdErr)
Terminalpublic int[] read(boolean readAhead)
throws IOException
Terminalread in interface TerminalIOExceptionpublic void writeToStdOut(String out) throws IOException
TerminalwriteToStdOut in interface Terminalout - what goes into the streamIOException - streampublic void writeToStdOut(char[] out)
throws IOException
TerminalwriteToStdOut in interface Terminalout - what goes into the streamIOException - streampublic void writeToStdOut(char out)
throws IOException
TerminalwriteToStdOut in interface Terminalout - what goes into the streamIOException - streampublic void writeToStdErr(String err) throws IOException
TerminalwriteToStdErr in interface Terminalerr - what goes into the streamIOException - streampublic void writeToStdErr(char[] err)
throws IOException
TerminalwriteToStdErr in interface Terminalerr - what goes into the streamIOException - streampublic void writeToStdErr(char err)
throws IOException
TerminalwriteToStdErr in interface Terminalerr - what goes into the streamIOException - streampublic TerminalSize getSize()
public CursorPosition getCursor()
public void setCursor(CursorPosition cp) throws IOException
TerminalsetCursor in interface TerminalIOExceptionpublic void moveCursor(int r,
int c)
throws IOException
TerminalmoveCursor in interface TerminalIOExceptionpublic void writeChar(TerminalCharacter character) throws IOException
TerminalwriteChar in interface TerminalIOExceptionpublic void writeChars(List<TerminalCharacter> chars) throws IOException
TerminalwriteChars in interface TerminalIOExceptionpublic boolean isEchoEnabled()
isEchoEnabled in interface Terminalpublic void reset()
throws IOException
Terminalreset in interface TerminalIOException - streampublic void clear()
throws IOException
Terminalclear in interface TerminalIOExceptionCopyright © 2014 JBoss by Red Hat. All rights reserved.