Class JniNativePty

java.lang.Object
org.jline.terminal.impl.AbstractPty
org.jline.terminal.impl.jni.JniNativePty
All Implemented Interfaces:
Closeable, AutoCloseable, org.jline.terminal.spi.Pty
Direct Known Subclasses:
FreeBsdNativePty, LinuxNativePty, OsXNativePty, SolarisNativePty

public abstract class JniNativePty extends org.jline.terminal.impl.AbstractPty implements org.jline.terminal.spi.Pty
  • Constructor Details

    • JniNativePty

      public JniNativePty(org.jline.terminal.spi.TerminalProvider provider, org.jline.terminal.spi.SystemStream systemStream, int master, FileDescriptor masterFD, int slave, FileDescriptor slaveFD, String name)
    • JniNativePty

      public JniNativePty(org.jline.terminal.spi.TerminalProvider provider, org.jline.terminal.spi.SystemStream systemStream, int master, FileDescriptor masterFD, int slave, FileDescriptor slaveFD, int slaveOut, FileDescriptor slaveOutFD, String name)
  • Method Details

    • ttyname

      protected static String ttyname(int fd) throws IOException
      Throws:
      IOException
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      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 interface org.jline.terminal.spi.Pty
    • getMasterOutput

      public OutputStream getMasterOutput()
      Specified by:
      getMasterOutput in interface org.jline.terminal.spi.Pty
    • doGetSlaveInput

      protected InputStream doGetSlaveInput()
      Specified by:
      doGetSlaveInput in class org.jline.terminal.impl.AbstractPty
    • getSlaveOutput

      public OutputStream getSlaveOutput()
      Specified by:
      getSlaveOutput in interface org.jline.terminal.spi.Pty
    • getAttr

      public org.jline.terminal.Attributes getAttr() throws IOException
      Specified by:
      getAttr in interface org.jline.terminal.spi.Pty
      Throws:
      IOException
    • doSetAttr

      protected void doSetAttr(org.jline.terminal.Attributes attr) throws IOException
      Specified by:
      doSetAttr in class org.jline.terminal.impl.AbstractPty
      Throws:
      IOException
    • getSize

      public org.jline.terminal.Size getSize() throws IOException
      Specified by:
      getSize in interface org.jline.terminal.spi.Pty
      Throws:
      IOException
    • setSize

      public void setSize(org.jline.terminal.Size size) throws IOException
      Specified by:
      setSize in interface org.jline.terminal.spi.Pty
      Throws:
      IOException
    • toTermios

      protected abstract org.jline.nativ.CLibrary.Termios toTermios(org.jline.terminal.Attributes t)
    • toAttributes

      protected abstract org.jline.terminal.Attributes toAttributes(org.jline.nativ.CLibrary.Termios tios)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isPosixSystemStream

      public static boolean isPosixSystemStream(org.jline.terminal.spi.SystemStream stream)
    • posixSystemStreamName

      public static String posixSystemStreamName(org.jline.terminal.spi.SystemStream systemStream)
    • systemStreamWidth

      public static int systemStreamWidth(org.jline.terminal.spi.SystemStream systemStream)