public class PosixPtyTerminal extends AbstractPosixTerminal
Terminal.MouseTracking, Terminal.Signal, Terminal.SignalHandleroriginalAttributes, ptybools, encoding, handlers, ints, name, status, strings, typeTYPE_DUMB, TYPE_DUMB_COLOR| Constructor and Description |
|---|
PosixPtyTerminal(String name,
String type,
Pty pty,
InputStream in,
OutputStream out,
Charset encoding) |
PosixPtyTerminal(String name,
String type,
Pty pty,
InputStream in,
OutputStream out,
Charset encoding,
Terminal.SignalHandler signalHandler) |
PosixPtyTerminal(String name,
String type,
Pty pty,
InputStream in,
OutputStream out,
Charset encoding,
Terminal.SignalHandler signalHandler,
boolean paused) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canPauseResume()
Whether this terminal supports
Terminal.pause() and Terminal.resume() calls. |
void |
close() |
InputStream |
input()
Retrieve the input stream for this terminal.
|
OutputStream |
output()
Retrieve the output stream for this terminal.
|
void |
pause()
Stop reading the input stream.
|
void |
pause(boolean wait)
Stop reading the input stream and optionally wait for the underlying threads to finish.
|
boolean |
paused()
Check whether the terminal is currently reading the input stream or not.
|
NonBlockingReader |
reader()
Retrieve the
Reader for this terminal. |
void |
resume()
Resume reading the input stream.
|
PrintWriter |
writer()
Retrieve the
Writer for this terminal. |
getAttributes, getCursorPosition, getPty, getSize, setAttributes, setSizecheckInterrupted, echo, echo, echoSignal, encoding, enterRawMode, flush, getBooleanCapability, getKind, getName, getNumericCapability, getStatus, getStatus, getStringCapability, getType, handle, hasFocusSupport, hasMouseSupport, parseInfoCmp, puts, raise, readMouseEvent, readMouseEvent, trackFocus, trackMousepublic PosixPtyTerminal(String name, String type, Pty pty, InputStream in, OutputStream out, Charset encoding) throws IOException
IOExceptionpublic PosixPtyTerminal(String name, String type, Pty pty, InputStream in, OutputStream out, Charset encoding, Terminal.SignalHandler signalHandler) throws IOException
IOExceptionpublic PosixPtyTerminal(String name, String type, Pty pty, InputStream in, OutputStream out, Charset encoding, Terminal.SignalHandler signalHandler, boolean paused) throws IOException
IOExceptionpublic InputStream input()
TerminalTerminal.reader() instead.Terminal.reader()public NonBlockingReader reader()
TerminalReader for this terminal.
This is the standard way to read input from this terminal.
The reader is non blocking.public OutputStream output()
TerminalTerminal.writer() instead.Terminal.writer();public PrintWriter writer()
TerminalWriter for this terminal.
This is the standard way to write to this terminal.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class AbstractPosixTerminalIOExceptionpublic boolean canPauseResume()
TerminalTerminal.pause() and Terminal.resume() calls.canPauseResume in interface TerminalcanPauseResume in class AbstractTerminalTerminal.pause() and Terminal.resume() calls.Terminal.paused(),
Terminal.pause(),
Terminal.resume()public void pause()
Terminalpause in interface Terminalpause in class AbstractTerminalTerminal.resume(),
Terminal.paused()public void pause(boolean wait)
throws InterruptedException
Terminalpause in interface Terminalpause in class AbstractTerminalwait - true to wait until the terminal is actually pausedInterruptedException - if the call has been interruptedpublic void resume()
Terminalresume in interface Terminalresume in class AbstractTerminalTerminal.pause(),
Terminal.paused()public boolean paused()
Terminalpaused in interface Terminalpaused in class AbstractTerminalTerminal.pause(),
Terminal.resume()Copyright © 2020. All rights reserved.