Class PTYOutputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable

    public class PTYOutputStream
    extends java.io.OutputStream
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Close the Reader
      protected void finalize()  
      void write​(byte[] b, int off, int len)  
      void write​(int b)
      Implementation of read for the InputStream.
      • Methods inherited from class java.io.OutputStream

        flush, nullOutputStream, write
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PTYOutputStream

        public PTYOutputStream​(PTY.MasterFD fd)
        From a Unix valid file descriptor set a Reader.
        Parameters:
        fd - file descriptor.
      • PTYOutputStream

        public PTYOutputStream​(PTY.MasterFD fd,
                               boolean sendEotBeforeClose)
        From a Unix valid file descriptor set a Reader.
        Parameters:
        fd - file descriptor.
        sendEotBeforeClose - flags the stream to send an EOT character before closing the stream to signalize end of stream.
        Since:
        5.9
    • Method Detail

      • write

        public void write​(byte[] b,
                          int off,
                          int len)
                   throws java.io.IOException
        Overrides:
        write in class java.io.OutputStream
        Throws:
        java.io.IOException
        See Also:
        OutputStream.write(byte[], int, int)
      • write

        public void write​(int b)
                   throws java.io.IOException
        Implementation of read for the InputStream.
        Specified by:
        write in class java.io.OutputStream
        Throws:
        java.io.IOException - on error.
      • close

        public void close()
                   throws java.io.IOException
        Close the Reader
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.io.OutputStream
        Throws:
        java.io.IOException - on error.
      • finalize

        protected void finalize()
                         throws java.io.IOException
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.io.IOException