Class JnaNativePty

    • Constructor Detail

      • JnaNativePty

        protected JnaNativePty​(TerminalProvider provider,
                               SystemStream systemStream,
                               int master,
                               java.io.FileDescriptor masterFD,
                               int slave,
                               java.io.FileDescriptor slaveFD,
                               java.lang.String name)
      • JnaNativePty

        protected JnaNativePty​(TerminalProvider provider,
                               SystemStream systemStream,
                               int master,
                               java.io.FileDescriptor masterFD,
                               int slave,
                               java.io.FileDescriptor slaveFD,
                               int slaveOut,
                               java.io.FileDescriptor slaveOutFD,
                               java.lang.String name)
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • getMaster

        public int getMaster()
      • getSlave

        public int getSlave()
      • getSlaveOut

        public int getSlaveOut()
      • getName

        public java.lang.String getName()
      • getMasterFD

        public java.io.FileDescriptor getMasterFD()
      • getSlaveFD

        public java.io.FileDescriptor getSlaveFD()
      • getSlaveOutFD

        public java.io.FileDescriptor getSlaveOutFD()
      • getMasterInput

        public java.io.InputStream getMasterInput()
        Description copied from interface: Pty
        Returns the input stream for the master side of the PTY.

        This stream receives data that has been written to the slave's output stream. Terminal emulators typically read from this stream to get the output from processes running in the terminal.

        Specified by:
        getMasterInput in interface Pty
        Returns:
        the master's input stream
      • getMasterOutput

        public java.io.OutputStream getMasterOutput()
        Description copied from interface: Pty
        Returns the output stream for the master side of the PTY.

        Data written to this stream will be available for reading from the slave's input stream. Terminal emulators typically write to this stream to send input to processes running in the terminal.

        Specified by:
        getMasterOutput in interface Pty
        Returns:
        the master's output stream
      • getSlaveOutput

        public java.io.OutputStream getSlaveOutput()
        Description copied from interface: Pty
        Returns the output stream for the slave side of the PTY.

        Data written to this stream will be available for reading from the master's input stream. Processes running in the terminal write to this stream to produce their output.

        Specified by:
        getSlaveOutput in interface Pty
        Returns:
        the slave's output stream
      • toString

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

        public static boolean isPosixSystemStream​(SystemStream stream)
      • posixSystemStreamName

        public static java.lang.String posixSystemStreamName​(SystemStream stream)