public class PosixSysTerminal extends AbstractPosixTerminal
Terminal.MouseTracking, Terminal.Signal, Terminal.SignalHandler| Modifier and Type | Field and Description |
|---|---|
protected ShutdownHooks.Task |
closer |
protected NonBlockingInputStream |
input |
protected Map<Terminal.Signal,Object> |
nativeHandlers |
protected OutputStream |
output |
protected NonBlockingReader |
reader |
protected PrintWriter |
writer |
originalAttributes, ptybools, encoding, handlers, ints, name, status, strings, typeTYPE_DUMB, TYPE_DUMB_COLOR| Constructor and Description |
|---|
PosixSysTerminal(String name,
String type,
Pty pty,
Charset encoding,
boolean nativeSignals,
Terminal.SignalHandler signalHandler) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Terminal.SignalHandler |
handle(Terminal.Signal signal,
Terminal.SignalHandler handler) |
InputStream |
input()
Retrieve the input stream for this terminal.
|
OutputStream |
output()
Retrieve the output stream for this terminal.
|
NonBlockingReader |
reader()
Retrieve the
Reader for this terminal. |
PrintWriter |
writer()
Retrieve the
Writer for this terminal. |
getAttributes, getCursorPosition, getPty, getSize, setAttributes, setSizecanPauseResume, checkInterrupted, echo, echo, echoSignal, encoding, enterRawMode, flush, getBooleanCapability, getKind, getName, getNumericCapability, getStatus, getStatus, getStringCapability, getType, hasFocusSupport, hasMouseSupport, parseInfoCmp, pause, pause, paused, puts, raise, readMouseEvent, readMouseEvent, resume, trackFocus, trackMouseprotected final NonBlockingInputStream input
protected final OutputStream output
protected final NonBlockingReader reader
protected final PrintWriter writer
protected final Map<Terminal.Signal,Object> nativeHandlers
protected final ShutdownHooks.Task closer
public PosixSysTerminal(String name, String type, Pty pty, Charset encoding, boolean nativeSignals, Terminal.SignalHandler signalHandler) throws IOException
IOExceptionpublic Terminal.SignalHandler handle(Terminal.Signal signal, Terminal.SignalHandler handler)
handle in interface Terminalhandle in class AbstractTerminalpublic NonBlockingReader reader()
TerminalReader for this terminal.
This is the standard way to read input from this terminal.
The reader is non blocking.public PrintWriter writer()
TerminalWriter for this terminal.
This is the standard way to write to this terminal.public InputStream input()
TerminalTerminal.reader() instead.Terminal.reader()public OutputStream output()
TerminalTerminal.writer() instead.Terminal.writer();public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class AbstractPosixTerminalIOExceptionCopyright © 2018. All rights reserved.