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)
Terminal
public int[] read(boolean readAhead) throws IOException
Terminal
read
in interface Terminal
IOException
public void writeToStdOut(String out) throws IOException
Terminal
writeToStdOut
in interface Terminal
out
- what goes into the streamIOException
- streampublic void writeToStdOut(char[] out) throws IOException
Terminal
writeToStdOut
in interface Terminal
out
- what goes into the streamIOException
- streampublic void writeToStdOut(char out) throws IOException
Terminal
writeToStdOut
in interface Terminal
out
- what goes into the streamIOException
- streampublic void writeToStdErr(String err) throws IOException
Terminal
writeToStdErr
in interface Terminal
err
- what goes into the streamIOException
- streampublic void writeToStdErr(char[] err) throws IOException
Terminal
writeToStdErr
in interface Terminal
err
- what goes into the streamIOException
- streampublic void writeToStdErr(char err) throws IOException
Terminal
writeToStdErr
in interface Terminal
err
- what goes into the streamIOException
- streampublic TerminalSize getSize()
public CursorPosition getCursor()
public void setCursor(CursorPosition cp) throws IOException
Terminal
setCursor
in interface Terminal
IOException
public void moveCursor(int r, int c) throws IOException
Terminal
moveCursor
in interface Terminal
IOException
public void writeChar(TerminalCharacter character) throws IOException
Terminal
writeChar
in interface Terminal
IOException
public void writeChars(List<TerminalCharacter> chars) throws IOException
Terminal
writeChars
in interface Terminal
IOException
public boolean isEchoEnabled()
isEchoEnabled
in interface Terminal
public void reset() throws IOException
Terminal
reset
in interface Terminal
IOException
- streampublic void clear() throws IOException
Terminal
clear
in interface Terminal
IOException
Copyright © 2014 JBoss by Red Hat. All rights reserved.