Class TerminalLineSettings

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String get​(java.lang.String args)  
      java.lang.String getConfig()  
      int getProperty​(java.lang.String name)
      Get the value of a stty property, including the management of a cache.
      protected static int getProperty​(java.lang.String name, java.lang.String stty)  
      java.lang.String getPropertyAsString​(java.lang.String name)  
      protected static java.lang.String getPropertyAsString​(java.lang.String name, java.lang.String stty)
      Parses a stty output (provided by stty -a) and return the value of a given property.
      static TerminalLineSettings getSettings​(java.lang.String device)  
      java.lang.String getTtyDevice()  
      void restore()  
      void set​(java.lang.String args)  
      void set​(java.lang.String... args)  
      void undef​(java.lang.String name)  
      static java.lang.String waitAndCapture​(java.lang.Process p)  
      • Methods inherited from class java.lang.Object

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

      • TerminalLineSettings

        @Deprecated
        public TerminalLineSettings()
                             throws java.io.IOException,
                                    java.lang.InterruptedException
        Deprecated.
        Throws:
        java.io.IOException
        java.lang.InterruptedException
      • TerminalLineSettings

        @Deprecated
        public TerminalLineSettings​(java.lang.String ttyDevice)
                             throws java.io.IOException,
                                    java.lang.InterruptedException
        Deprecated.
        Throws:
        java.io.IOException
        java.lang.InterruptedException
    • Method Detail

      • getSettings

        public static TerminalLineSettings getSettings​(java.lang.String device)
                                                throws java.io.IOException,
                                                       java.lang.InterruptedException
        Throws:
        java.io.IOException
        java.lang.InterruptedException
      • getTtyDevice

        public java.lang.String getTtyDevice()
      • getConfig

        public java.lang.String getConfig()
      • restore

        public void restore()
                     throws java.io.IOException,
                            java.lang.InterruptedException
        Throws:
        java.io.IOException
        java.lang.InterruptedException
      • get

        public java.lang.String get​(java.lang.String args)
                             throws java.io.IOException,
                                    java.lang.InterruptedException
        Throws:
        java.io.IOException
        java.lang.InterruptedException
      • set

        public void set​(java.lang.String args)
                 throws java.io.IOException,
                        java.lang.InterruptedException
        Throws:
        java.io.IOException
        java.lang.InterruptedException
      • set

        public void set​(java.lang.String... args)
                 throws java.io.IOException,
                        java.lang.InterruptedException
        Throws:
        java.io.IOException
        java.lang.InterruptedException
      • undef

        public void undef​(java.lang.String name)
                   throws java.io.IOException,
                          java.lang.InterruptedException
        Throws:
        java.io.IOException
        java.lang.InterruptedException
      • getProperty

        public int getProperty​(java.lang.String name)

        Get the value of a stty property, including the management of a cache.

        Parameters:
        name - the stty property.
        Returns:
        the stty property value.
      • getPropertyAsString

        public java.lang.String getPropertyAsString​(java.lang.String name)
      • getPropertyAsString

        protected static java.lang.String getPropertyAsString​(java.lang.String name,
                                                              java.lang.String stty)

        Parses a stty output (provided by stty -a) and return the value of a given property.

        Parameters:
        name - property name.
        stty - string resulting of stty -a execution.
        Returns:
        value of the given property.
      • getProperty

        protected static int getProperty​(java.lang.String name,
                                         java.lang.String stty)
      • waitAndCapture

        public static java.lang.String waitAndCapture​(java.lang.Process p)
                                               throws java.io.IOException,
                                                      java.lang.InterruptedException
        Throws:
        java.io.IOException
        java.lang.InterruptedException