Class PTYInputStream

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

    public class PTYInputStream
    extends java.io.InputStream
    Since:
    6.0
    • Constructor Summary

      Constructors 
      Constructor Description
      PTYInputStream​(PTY.MasterFD fd)
      From a Unix valid file descriptor set a Reader.
    • Method Summary

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

        available, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
      • Methods inherited from class java.lang.Object

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

      • PTYInputStream

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

      • read

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

        public int read​(byte[] buf,
                        int off,
                        int len)
                 throws java.io.IOException
        Overrides:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
        See Also:
        InputStream.read(byte[], int, int)
      • 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.InputStream
        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