- 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 protected
JnaNativePty(int master, FileDescriptor masterFD, int slave, FileDescriptor slaveFD, int slaveOut, FileDescriptor slaveOutFD, String name)
protected
JnaNativePty(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 void
close()
static JnaNativePty
current()
protected InputStream
doGetSlaveInput()
int
getMaster()
FileDescriptor
getMasterFD()
InputStream
getMasterInput()
OutputStream
getMasterOutput()
String
getName()
int
getSlave()
FileDescriptor
getSlaveFD()
int
getSlaveOut()
FileDescriptor
getSlaveOutFD()
OutputStream
getSlaveOutput()
static boolean
isConsoleInput()
static boolean
isConsoleOutput()
protected static FileDescriptor
newDescriptor(int fd)
static JnaNativePty
open(Attributes attr, Size size)
String
toString()
-
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:
close
in interfaceAutoCloseable
- Specified by:
close
in 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:
getMasterInput
in interfacePty
-
getMasterOutput
public OutputStream getMasterOutput()
- Specified by:
getMasterOutput
in interfacePty
-
doGetSlaveInput
protected InputStream doGetSlaveInput()
- Specified by:
doGetSlaveInput
in classAbstractPty
-
getSlaveOutput
public OutputStream getSlaveOutput()
- Specified by:
getSlaveOutput
in interfacePty
-
newDescriptor
protected static FileDescriptor newDescriptor(int fd)
-
isConsoleOutput
public static boolean isConsoleOutput()
-
isConsoleInput
public static boolean isConsoleInput()
-
-