- java.lang.Object
-
- org.jline.terminal.impl.AbstractPty
-
- org.jline.terminal.impl.jansi.JansiNativePty
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Pty
- Direct Known Subclasses:
FreeBsdNativePty
,LinuxNativePty
,OsXNativePty
,SolarisNativePty
public abstract class JansiNativePty extends AbstractPty implements Pty
-
-
Constructor Summary
Constructors Constructor Description JansiNativePty(int master, FileDescriptor masterFD, int slave, FileDescriptor slaveFD, int slaveOut, FileDescriptor slaveOutFD, String name)
JansiNativePty(int master, FileDescriptor masterFD, int slave, FileDescriptor slaveFD, String name)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
close()
protected InputStream
doGetSlaveInput()
protected void
doSetAttr(Attributes attr)
Attributes
getAttr()
int
getMaster()
FileDescriptor
getMasterFD()
InputStream
getMasterInput()
OutputStream
getMasterOutput()
String
getName()
Size
getSize()
int
getSlave()
FileDescriptor
getSlaveFD()
int
getSlaveOut()
FileDescriptor
getSlaveOutFD()
OutputStream
getSlaveOutput()
static boolean
isConsoleInput()
static boolean
isConsoleOutput()
protected static FileDescriptor
newDescriptor(int fd)
void
setSize(Size size)
protected abstract Attributes
toAttributes(org.fusesource.jansi.internal.CLibrary.Termios tios)
String
toString()
protected abstract org.fusesource.jansi.internal.CLibrary.Termios
toTermios(Attributes t)
protected static String
ttyname()
-
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
-
-
-
-
Constructor Detail
-
JansiNativePty
public JansiNativePty(int master, FileDescriptor masterFD, int slave, FileDescriptor slaveFD, String name)
-
JansiNativePty
public JansiNativePty(int master, FileDescriptor masterFD, int slave, FileDescriptor slaveFD, int slaveOut, FileDescriptor slaveOutFD, String name)
-
-
Method Detail
-
ttyname
protected static String ttyname() 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
-
getAttr
public Attributes getAttr() throws IOException
- Specified by:
getAttr
in interfacePty
- Throws:
IOException
-
doSetAttr
protected void doSetAttr(Attributes attr) throws IOException
- Specified by:
doSetAttr
in classAbstractPty
- Throws:
IOException
-
getSize
public Size getSize() throws IOException
- Specified by:
getSize
in interfacePty
- Throws:
IOException
-
setSize
public void setSize(Size size) throws IOException
- Specified by:
setSize
in interfacePty
- Throws:
IOException
-
toTermios
protected abstract org.fusesource.jansi.internal.CLibrary.Termios toTermios(Attributes t)
-
toAttributes
protected abstract Attributes toAttributes(org.fusesource.jansi.internal.CLibrary.Termios tios)
-
newDescriptor
protected static FileDescriptor newDescriptor(int fd)
-
isConsoleOutput
public static boolean isConsoleOutput()
-
isConsoleInput
public static boolean isConsoleInput()
-
-