Class SolarisNativePty
- java.lang.Object
-
- org.jline.terminal.impl.AbstractPty
-
- org.jline.terminal.impl.jna.JnaNativePty
-
- org.jline.terminal.impl.jna.solaris.SolarisNativePty
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,Pty
public class SolarisNativePty extends JnaNativePty
-
-
Field Summary
-
Fields inherited from class org.jline.terminal.impl.AbstractPty
provider, systemStream
-
-
Constructor Summary
Constructors Constructor Description SolarisNativePty(TerminalProvider provider, SystemStream systemStream, int master, java.io.FileDescriptor masterFD, int slave, java.io.FileDescriptor slaveFD, int slaveOut, java.io.FileDescriptor slaveOutFD, java.lang.String name)
SolarisNativePty(TerminalProvider provider, SystemStream systemStream, int master, java.io.FileDescriptor masterFD, int slave, java.io.FileDescriptor slaveFD, java.lang.String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SolarisNativePty
current(TerminalProvider provider, SystemStream systemStream)
protected void
doSetAttr(Attributes attr)
Attributes
getAttr()
Returns the current terminal attributes for this PTY.Size
getSize()
Returns the current size (dimensions) of this PTY.static int
isatty(int fd)
static SolarisNativePty
open(TerminalProvider provider, Attributes attr, Size size)
void
setSize(Size size)
Sets the size (dimensions) of this PTY.static java.lang.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 Detail
-
SolarisNativePty
public SolarisNativePty(TerminalProvider provider, SystemStream systemStream, int master, java.io.FileDescriptor masterFD, int slave, java.io.FileDescriptor slaveFD, java.lang.String name)
-
SolarisNativePty
public SolarisNativePty(TerminalProvider provider, SystemStream systemStream, int master, java.io.FileDescriptor masterFD, int slave, java.io.FileDescriptor slaveFD, int slaveOut, java.io.FileDescriptor slaveOutFD, java.lang.String name)
-
-
Method Detail
-
current
public static SolarisNativePty current(TerminalProvider provider, SystemStream systemStream) throws java.io.IOException
- Throws:
java.io.IOException
-
open
public static SolarisNativePty open(TerminalProvider provider, Attributes attr, Size size) throws java.io.IOException
- Throws:
java.io.IOException
-
getAttr
public Attributes getAttr() throws java.io.IOException
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:
java.io.IOException
- if an I/O error occurs- See Also:
Attributes
-
doSetAttr
protected void doSetAttr(Attributes attr) throws java.io.IOException
- Specified by:
doSetAttr
in classAbstractPty
- Throws:
java.io.IOException
-
getSize
public Size getSize() throws java.io.IOException
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:
java.io.IOException
- if an I/O error occurs- See Also:
Size
-
setSize
public void setSize(Size size) throws java.io.IOException
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:
java.io.IOException
- if an I/O error occurs- See Also:
Size
-
isatty
public static int isatty(int fd)
-
ttyname
public static java.lang.String ttyname(int slave)
-
-