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:
java.io.Closeable
,java.lang.AutoCloseable
,Pty
public class LinuxNativePty extends JnaNativePty
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
LinuxNativePty.UtilLibrary
-
Constructor Summary
Constructors Constructor Description LinuxNativePty(int master, java.io.FileDescriptor masterFD, int slave, java.io.FileDescriptor slaveFD, int slaveOut, java.io.FileDescriptor slaveOutFD, java.lang.String name)
LinuxNativePty(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 LinuxNativePty
current(TerminalProvider.Stream consoleStream)
protected void
doSetAttr(Attributes attr)
Attributes
getAttr()
Size
getSize()
static int
isatty(int fd)
static LinuxNativePty
open(Attributes attr, Size size)
void
setSize(Size size)
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, newDescriptor, posixSystemStreamName, toString
-
Methods inherited from class org.jline.terminal.impl.AbstractPty
checkInterrupted, getSlaveInput, 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
getSlaveInput, setAttr
-
-
-
-
Field Detail
-
C_LIBRARY
private static final CLibrary C_LIBRARY
-
-
Constructor Detail
-
LinuxNativePty
public LinuxNativePty(int master, java.io.FileDescriptor masterFD, int slave, java.io.FileDescriptor slaveFD, java.lang.String name)
-
LinuxNativePty
public LinuxNativePty(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 LinuxNativePty current(TerminalProvider.Stream consoleStream) throws java.io.IOException
- Throws:
java.io.IOException
-
open
public static LinuxNativePty open(Attributes attr, Size size) throws java.io.IOException
- Throws:
java.io.IOException
-
getAttr
public Attributes getAttr() throws java.io.IOException
- Throws:
java.io.IOException
-
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
- Throws:
java.io.IOException
-
setSize
public void setSize(Size size) throws java.io.IOException
- Throws:
java.io.IOException
-
isatty
public static int isatty(int fd)
-
ttyname
public static java.lang.String ttyname(int slave)
-
-