public class POSIXTerminal extends AbstractTerminal
| Constructor and Description |
|---|
POSIXTerminal() |
| Modifier and Type | Method and Description |
|---|---|
TerminalSize |
getSize() |
void |
init(InputStream inputStream,
OutputStream stdOut,
OutputStream stdErr)
Initialize the Terminal with which input/output stream it should use
|
boolean |
isEchoEnabled() |
int[] |
read(boolean readAhead)
Read from the input stream (char by char)
|
void |
reset()
Set it back to normal when we exit
|
protected static String |
stty(String args)
Run stty with arguments on the active terminal
|
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
|
clear, getCursor, moveCursor, setCursor, writeChar, writeCharspublic void init(InputStream inputStream, OutputStream stdOut, OutputStream stdErr)
TerminalinputStream - inputstdOut - standard outputstdErr - error outputpublic int[] read(boolean readAhead)
throws IOException
TerminalIOExceptionTerminalpublic void writeToStdOut(String out) throws IOException
Terminalout - what goes into the streamIOException - streamTerminalpublic void writeToStdOut(char[] out)
throws IOException
Terminalout - what goes into the streamIOException - streamTerminalpublic void writeToStdOut(char out)
throws IOException
Terminalout - what goes into the streamIOException - streamTerminalpublic void writeToStdErr(String err) throws IOException
Terminalerr - what goes into the streamIOException - streamTerminalpublic void writeToStdErr(char[] err)
throws IOException
Terminalerr - what goes into the streamIOException - streamTerminalpublic void writeToStdErr(char err)
throws IOException
Terminalerr - what goes into the streamIOException - streamTerminalpublic TerminalSize getSize()
public boolean isEchoEnabled()
Terminalpublic void reset()
throws IOException
TerminalIOException - streamTerminalprotected static String stty(String args) throws IOException, InterruptedException
args - argumentsIOException - streamInterruptedException - streamCopyright © 2014 JBoss by Red Hat. All rights reserved.