- java.lang.Object
-
- org.jline.terminal.impl.AbstractTerminal
-
- org.jline.terminal.impl.AbstractPosixTerminal
-
- org.jline.terminal.impl.PosixSysTerminal
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable,Terminal
public class PosixSysTerminal extends AbstractPosixTerminal
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jline.terminal.Terminal
Terminal.MouseTracking, Terminal.Signal, Terminal.SignalHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected ShutdownHooks.Taskcloserprotected NonBlockingInputStreaminputprotected Map<Terminal.Signal,Object>nativeHandlersprotected OutputStreamoutputprotected NonBlockingReaderreaderprotected PrintWriterwriter-
Fields inherited from class org.jline.terminal.impl.AbstractPosixTerminal
originalAttributes, pty
-
Fields inherited from class org.jline.terminal.impl.AbstractTerminal
bools, encoding, handlers, ints, name, onClose, palette, status, strings, type
-
Fields inherited from interface org.jline.terminal.Terminal
TYPE_DUMB, TYPE_DUMB_COLOR
-
-
Constructor Summary
Constructors Constructor Description PosixSysTerminal(String name, String type, Pty pty, Charset encoding, boolean nativeSignals, Terminal.SignalHandler signalHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoClose()Terminal.SignalHandlerhandle(Terminal.Signal signal, Terminal.SignalHandler handler)InputStreaminput()Retrieve the input stream for this terminal.OutputStreamoutput()Retrieve the output stream for this terminal.NonBlockingReaderreader()Retrieve theReaderfor this terminal.PrintWriterwriter()Retrieve theWriterfor this terminal.-
Methods inherited from class org.jline.terminal.impl.AbstractPosixTerminal
getAttributes, getCursorPosition, getPty, getSize, setAttributes, setSize
-
Methods inherited from class org.jline.terminal.impl.AbstractTerminal
canPauseResume, checkInterrupted, close, echo, echo, echoSignal, encoding, enterRawMode, flush, getBooleanCapability, getKind, getName, getNumericCapability, getPalette, getStatus, getStatus, getStringCapability, getType, hasFocusSupport, hasMouseSupport, parseInfoCmp, pause, pause, paused, puts, raise, readMouseEvent, readMouseEvent, resume, setOnClose, trackFocus, trackMouse
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jline.terminal.Terminal
getBufferSize, getHeight, getWidth
-
-
-
-
Field Detail
-
input
protected final NonBlockingInputStream input
-
output
protected final OutputStream output
-
reader
protected final NonBlockingReader reader
-
writer
protected final PrintWriter writer
-
nativeHandlers
protected final Map<Terminal.Signal,Object> nativeHandlers
-
closer
protected final ShutdownHooks.Task closer
-
-
Constructor Detail
-
PosixSysTerminal
public PosixSysTerminal(String name, String type, Pty pty, Charset encoding, boolean nativeSignals, Terminal.SignalHandler signalHandler) throws IOException
- Throws:
IOException
-
-
Method Detail
-
handle
public Terminal.SignalHandler handle(Terminal.Signal signal, Terminal.SignalHandler handler)
- Specified by:
handlein interfaceTerminal- Overrides:
handlein classAbstractTerminal
-
reader
public NonBlockingReader reader()
Description copied from interface:TerminalRetrieve theReaderfor this terminal. This is the standard way to read input from this terminal. The reader is non blocking.- Returns:
- The non blocking reader
-
writer
public PrintWriter writer()
Description copied from interface:TerminalRetrieve theWriterfor this terminal. This is the standard way to write to this terminal.- Returns:
- The writer
-
input
public InputStream input()
Description copied from interface:TerminalRetrieve the input stream for this terminal. In some rare cases, there may be a need to access the terminal input stream directly. In the usual cases, use theTerminal.reader()instead.- Returns:
- The input stream
- See Also:
Terminal.reader()
-
output
public OutputStream output()
Description copied from interface:TerminalRetrieve the output stream for this terminal. In some rare cases, there may be a need to access the terminal output stream directly. In the usual cases, use theTerminal.writer()instead.- Returns:
- The output stream
- See Also:
Terminal.writer()
-
doClose
protected void doClose() throws IOException- Overrides:
doClosein classAbstractPosixTerminal- Throws:
IOException
-
-