APIdia Launch Partner
Top Fields Constructors Methods
jdk.internal.org.jline.terminal.impl

public Class PosixSysTerminal

extends AbstractPosixTerminal
Class Inheritance
Imports
java.io.IOException, .InputStream, .OutputStream, .OutputStreamWriter, .PrintWriter, java.nio.charset.Charset, java.util.HashMap, .Map, java.util.function.Function, jdk.internal.org.jline.terminal.spi.Pty, jdk.internal.org.jline.utils.FastBufferedOutputStream, .NonBlocking, .NonBlockingInputStream, .NonBlockingReader, .ShutdownHooks, .ShutdownHooks.Task, .Signals

Field Summary

Modifier and TypeField and Description
protected final ShutdownHooks.Task
protected final NonBlockingInputStream
protected final Map<Terminal.Signal, Object>
protected final OutputStream
protected final NonBlockingReader
protected final PrintWriter
Inherited from jdk.internal.org.jline.terminal.impl.AbstractPosixTerminal:
originalAttributespty

Constructor Summary

AccessConstructor and Description
public
PosixSysTerminal(String name, String type, Pty pty, Charset encoding, boolean nativeSignals, Terminal.SignalHandler signalHandler, Function<InputStream, InputStream> inputStreamWrapper)

Method Summary

Modifier and TypeMethod and Description
protected void
public Terminal.SignalHandler
public InputStream
input()

Implements jdk.internal.org.jline.terminal.Terminal.input.

Retrieve the input stream for this terminal.

public OutputStream
output()

Implements jdk.internal.org.jline.terminal.Terminal.output.

Retrieve the output stream for this terminal.

public NonBlockingReader
reader()

Implements jdk.internal.org.jline.terminal.Terminal.reader.

Retrieve the Reader for this terminal.

public PrintWriter
writer()

Implements jdk.internal.org.jline.terminal.Terminal.writer.

Retrieve the Writer for this terminal.

Inherited from jdk.internal.org.jline.terminal.impl.AbstractPosixTerminal:
getAttributesgetCursorPositiongetProvidergetPtygetSizegetSystemStreamsetAttributessetSizetoString

Field Detail

closerback to summary
protected final ShutdownHooks.Task closer
inputback to summary
protected final NonBlockingInputStream input
nativeHandlersback to summary
protected final Map<Terminal.Signal, Object> nativeHandlers
outputback to summary
protected final OutputStream output
readerback to summary
protected final NonBlockingReader reader
writerback to summary
protected final PrintWriter writer

Constructor Detail

PosixSysTerminalback to summary
public PosixSysTerminal(String name, String type, Pty pty, Charset encoding, boolean nativeSignals, Terminal.SignalHandler signalHandler, Function<InputStream, InputStream> inputStreamWrapper) throws IOException
Annotations
@SuppressWarnings:this-escape

Method Detail

doCloseback to summary
protected void doClose() throws IOException

Overrides jdk.internal.org.jline.terminal.impl.AbstractPosixTerminal.doClose.

Annotations
@Override
handleback to summary
public Terminal.SignalHandler handle(Terminal.Signal signal, Terminal.SignalHandler handler)

Overrides jdk.internal.org.jline.terminal.impl.AbstractTerminal.handle.

Implements jdk.internal.org.jline.terminal.Terminal.handle.

Doc from jdk.internal.org.jline.terminal.Terminal.handle.

Registers a handler for the given Signal.

Note that the JVM does not easily allow catching the Signal#QUIT signal, which causes a thread dump to be displayed. This signal is mainly used when connecting through an SSH socket to a virtual terminal.

Annotations
@Override
inputback to summary
public InputStream input()

Implements jdk.internal.org.jline.terminal.Terminal.input.

Doc from jdk.internal.org.jline.terminal.Terminal.input.

Retrieve 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 the reader() instead.

Annotations
@Override
outputback to summary
public OutputStream output()

Implements jdk.internal.org.jline.terminal.Terminal.output.

Doc from jdk.internal.org.jline.terminal.Terminal.output.

Retrieve 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 the writer() instead.

Annotations
@Override
readerback to summary
public NonBlockingReader reader()

Implements jdk.internal.org.jline.terminal.Terminal.reader.

Doc from jdk.internal.org.jline.terminal.Terminal.reader.

Retrieve the Reader for this terminal. This is the standard way to read input from this terminal. The reader is non blocking.

writerback to summary
public PrintWriter writer()

Implements jdk.internal.org.jline.terminal.Terminal.writer.

Doc from jdk.internal.org.jline.terminal.Terminal.writer.

Retrieve the Writer for this terminal. This is the standard way to write to this terminal.