Class LinuxNativePty
java.lang.Object
org.jline.terminal.impl.AbstractPty
org.jline.terminal.impl.jna.JnaNativePty
org.jline.terminal.impl.jna.linux.LinuxNativePty
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Pty
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class org.jline.terminal.impl.AbstractPty
provider, systemStream
-
Constructor Summary
ConstructorsConstructorDescriptionLinuxNativePty
(TerminalProvider provider, SystemStream systemStream, int master, FileDescriptor masterFD, int slave, FileDescriptor slaveFD, int slaveOut, FileDescriptor slaveOutFD, String name) LinuxNativePty
(TerminalProvider provider, SystemStream systemStream, int master, FileDescriptor masterFD, int slave, FileDescriptor slaveFD, String name) -
Method Summary
Modifier and TypeMethodDescriptionstatic LinuxNativePty
current
(TerminalProvider provider, SystemStream systemStream) protected void
doSetAttr
(Attributes attr) getAttr()
Returns the current terminal attributes for this PTY.getSize()
Returns the current size (dimensions) of this PTY.static int
isatty
(int fd) static LinuxNativePty
open
(TerminalProvider provider, Attributes attr, Size size) void
Sets the size (dimensions) of this PTY.static String
ttyname
(int slave) Methods inherited from class org.jline.terminal.impl.jna.JnaNativePty
close, doGetSlaveInput, getMaster, getMasterFD, getMasterInput, getMasterOutput, getName, getSlave, getSlaveFD, getSlaveOut, getSlaveOutFD, getSlaveOutput, isPosixSystemStream, posixSystemStreamName, toString
Methods inherited from class org.jline.terminal.impl.AbstractPty
checkInterrupted, getProvider, getSlaveInput, getSystemStream, newDescriptor, setAttr
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jline.terminal.spi.Pty
getProvider, getSlaveInput, getSystemStream, setAttr
-
Constructor Details
-
LinuxNativePty
public LinuxNativePty(TerminalProvider provider, SystemStream systemStream, int master, FileDescriptor masterFD, int slave, FileDescriptor slaveFD, String name) -
LinuxNativePty
public LinuxNativePty(TerminalProvider provider, SystemStream systemStream, int master, FileDescriptor masterFD, int slave, FileDescriptor slaveFD, int slaveOut, FileDescriptor slaveOutFD, String name)
-
-
Method Details
-
current
public static LinuxNativePty current(TerminalProvider provider, SystemStream systemStream) throws IOException - Throws:
IOException
-
open
public static LinuxNativePty open(TerminalProvider provider, Attributes attr, Size size) throws IOException - Throws:
IOException
-
getAttr
Description copied from interface:Pty
Returns the current terminal attributes for this PTY.Terminal attributes control various aspects of terminal behavior, such as echo settings, line discipline, and control characters.
- Returns:
- the current terminal attributes
- Throws:
IOException
- if an I/O error occurs- See Also:
-
doSetAttr
- Specified by:
doSetAttr
in classAbstractPty
- Throws:
IOException
-
getSize
Description copied from interface:Pty
Returns the current size (dimensions) of this PTY.The size includes the number of rows and columns in the terminal window.
- Returns:
- the current terminal size
- Throws:
IOException
- if an I/O error occurs- See Also:
-
setSize
Description copied from interface:Pty
Sets the size (dimensions) of this PTY.This method changes the number of rows and columns in the terminal window. When the size changes, a SIGWINCH signal is typically sent to processes running in the terminal.
- Parameters:
size
- the new terminal size to set- Throws:
IOException
- if an I/O error occurs- See Also:
-
isatty
public static int isatty(int fd) -
ttyname
-