- 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 voidclose()protected InputStreamdoGetSlaveInput()protected voiddoSetAttr(Attributes attr)AttributesgetAttr()intgetMaster()FileDescriptorgetMasterFD()InputStreamgetMasterInput()OutputStreamgetMasterOutput()StringgetName()SizegetSize()intgetSlave()FileDescriptorgetSlaveFD()intgetSlaveOut()FileDescriptorgetSlaveOutFD()OutputStreamgetSlaveOutput()static booleanisConsoleInput()static booleanisConsoleOutput()protected static FileDescriptornewDescriptor(int fd)voidsetSize(Size size)protected abstract AttributestoAttributes(org.fusesource.jansi.internal.CLibrary.Termios tios)StringtoString()protected abstract org.fusesource.jansi.internal.CLibrary.TermiostoTermios(Attributes t)protected static Stringttyname()-
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:
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
-
getAttr
public Attributes getAttr() throws IOException
- Specified by:
getAttrin interfacePty- Throws:
IOException
-
doSetAttr
protected void doSetAttr(Attributes attr) throws IOException
- Specified by:
doSetAttrin classAbstractPty- Throws:
IOException
-
getSize
public Size getSize() throws IOException
- Specified by:
getSizein interfacePty- Throws:
IOException
-
setSize
public void setSize(Size size) throws IOException
- Specified by:
setSizein 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()
-
-