public interface Terminal
| 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 rows,
int columns)
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 position)
Set cursor position
|
void |
writeChar(TerminalCharacter c)
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
|
void init(InputStream inputStream, OutputStream stdOut, OutputStream stdErr)
inputStream - inputstdOut - standard outputstdErr - error outputint[] read(boolean readAhead)
throws IOException
IOExceptionvoid writeToStdOut(String out) throws IOException
out - what goes into the streamIOException - streamvoid writeToStdOut(char[] out)
throws IOException
out - what goes into the streamIOException - streamvoid writeToStdOut(char out)
throws IOException
out - what goes into the streamIOException - streamvoid writeToStdErr(String err) throws IOException
err - what goes into the streamIOException - streamvoid writeToStdErr(char[] err)
throws IOException
err - what goes into the streamIOException - streamvoid writeToStdErr(char err)
throws IOException
err - what goes into the streamIOException - streamTerminalSize getSize()
CursorPosition getCursor()
void setCursor(CursorPosition position) throws IOException
IOExceptionvoid moveCursor(int rows,
int columns)
throws IOException
IOExceptionvoid writeChar(TerminalCharacter c) throws IOException
IOExceptionvoid writeChars(List<TerminalCharacter> chars) throws IOException
IOExceptionboolean isEchoEnabled()
void reset()
throws IOException
IOException - streamvoid clear()
throws IOException
IOExceptionCopyright © 2014 JBoss by Red Hat. All rights reserved.