- java.lang.Object
-
- org.jline.terminal.impl.AbstractPty
-
- org.jline.terminal.impl.jna.JnaNativePty
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Pty
- Direct Known Subclasses:
FreeBsdNativePty,LinuxNativePty,OsXNativePty,SolarisNativePty
public abstract class JnaNativePty extends AbstractPty implements Pty
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedJnaNativePty(int master, FileDescriptor masterFD, int slave, FileDescriptor slaveFD, int slaveOut, FileDescriptor slaveOutFD, String name)protectedJnaNativePty(int master, FileDescriptor masterFD, int slave, FileDescriptor slaveFD, String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()static JnaNativePtycurrent()protected InputStreamdoGetSlaveInput()intgetMaster()FileDescriptorgetMasterFD()InputStreamgetMasterInput()OutputStreamgetMasterOutput()StringgetName()intgetSlave()FileDescriptorgetSlaveFD()intgetSlaveOut()FileDescriptorgetSlaveOutFD()OutputStreamgetSlaveOutput()static booleanisConsoleInput()static booleanisConsoleOutput()protected static FileDescriptornewDescriptor(int fd)static JnaNativePtyopen(Attributes attr, Size size)StringtoString()-
Methods inherited from class org.jline.terminal.impl.AbstractPty
checkInterrupted, doSetAttr, getSlaveInput, setAttr
-
-
-
-
Constructor Detail
-
JnaNativePty
protected JnaNativePty(int master, FileDescriptor masterFD, int slave, FileDescriptor slaveFD, String name)
-
JnaNativePty
protected JnaNativePty(int master, FileDescriptor masterFD, int slave, FileDescriptor slaveFD, int slaveOut, FileDescriptor slaveOutFD, String name)
-
-
Method Detail
-
current
public static JnaNativePty current() throws IOException
- Throws:
IOException
-
open
public static JnaNativePty open(Attributes attr, Size size) throws IOException
- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getMaster
public int getMaster()
-
getSlave
public int getSlave()
-
getSlaveOut
public int getSlaveOut()
-
getName
public String getName()
-
getMasterFD
public FileDescriptor getMasterFD()
-
getSlaveFD
public FileDescriptor getSlaveFD()
-
getSlaveOutFD
public FileDescriptor getSlaveOutFD()
-
getMasterInput
public InputStream getMasterInput()
- Specified by:
getMasterInputin interfacePty
-
getMasterOutput
public OutputStream getMasterOutput()
- Specified by:
getMasterOutputin interfacePty
-
doGetSlaveInput
protected InputStream doGetSlaveInput()
- Specified by:
doGetSlaveInputin classAbstractPty
-
getSlaveOutput
public OutputStream getSlaveOutput()
- Specified by:
getSlaveOutputin interfacePty
-
newDescriptor
protected static FileDescriptor newDescriptor(int fd)
-
isConsoleOutput
public static boolean isConsoleOutput()
-
isConsoleInput
public static boolean isConsoleInput()
-
-