Closeable
, Flushable
, AutoCloseable
, Terminal
public class PosixSysTerminal extends AbstractPosixTerminal
Terminal.MouseTracking, Terminal.Signal, Terminal.SignalHandler
Modifier and Type | Field | Description |
---|---|---|
protected ShutdownHooks.Task |
closer |
|
protected NonBlockingInputStream |
input |
|
protected Map<Terminal.Signal,Object> |
nativeHandlers |
|
protected OutputStream |
output |
|
protected NonBlockingReader |
reader |
|
protected PrintWriter |
writer |
originalAttributes, pty
bools, encoding, handlers, ints, name, onClose, status, strings, type
TYPE_DUMB, TYPE_DUMB_COLOR
Constructor | Description |
---|---|
PosixSysTerminal(String name,
String type,
Pty pty,
Charset encoding,
boolean nativeSignals,
Terminal.SignalHandler signalHandler) |
Modifier and Type | Method | Description |
---|---|---|
protected void |
doClose() |
|
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, setSize
canPauseResume, checkInterrupted, close, 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, setOnClose, trackFocus, trackMouse
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBufferSize, getHeight, getWidth
protected 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
IOException
public Terminal.SignalHandler handle(Terminal.Signal signal, Terminal.SignalHandler handler)
handle
in interface Terminal
handle
in class AbstractTerminal
public NonBlockingReader reader()
Terminal
Reader
for this terminal.
This is the standard way to read input from this terminal.
The reader is non blocking.public PrintWriter writer()
Terminal
Writer
for this terminal.
This is the standard way to write to this terminal.public InputStream input()
Terminal
Terminal.reader()
instead.Terminal.reader()
public OutputStream output()
Terminal
Terminal.writer()
instead.Terminal.writer()
protected void doClose() throws IOException
doClose
in class AbstractPosixTerminal
IOException
Copyright © 2020. All rights reserved.