Package jline

Class TerminalSupport

    • Field Detail

      • supported

        private boolean supported
      • echoEnabled

        private boolean echoEnabled
      • ansiSupported

        private boolean ansiSupported
    • Constructor Detail

      • TerminalSupport

        protected TerminalSupport​(boolean supported)
    • Method Detail

      • init

        public void init()
                  throws java.lang.Exception
        Specified by:
        init in interface Terminal
        Throws:
        java.lang.Exception
      • restore

        public void restore()
                     throws java.lang.Exception
        Specified by:
        restore in interface Terminal
        Throws:
        java.lang.Exception
      • reset

        public void reset()
                   throws java.lang.Exception
        Specified by:
        reset in interface Terminal
        Throws:
        java.lang.Exception
      • isSupported

        public final boolean isSupported()
        Specified by:
        isSupported in interface Terminal
      • setAnsiSupported

        protected void setAnsiSupported​(boolean supported)
      • wrapOutIfNeeded

        public java.io.OutputStream wrapOutIfNeeded​(java.io.OutputStream out)
        Subclass to change behavior if needed.
        Specified by:
        wrapOutIfNeeded in interface Terminal
        Returns:
        the passed out
      • hasWeirdWrap

        public boolean hasWeirdWrap()
        Defaults to true which was the behaviour before this method was added.
        Specified by:
        hasWeirdWrap in interface Terminal
      • getWidth

        public int getWidth()
        Specified by:
        getWidth in interface Terminal
      • setEchoEnabled

        public void setEchoEnabled​(boolean enabled)
        Specified by:
        setEchoEnabled in interface Terminal
      • wrapInIfNeeded

        public java.io.InputStream wrapInIfNeeded​(java.io.InputStream in)
                                           throws java.io.IOException
        Description copied from interface: Terminal
        When using native support, return the InputStream to use for reading characters else return the input stream passed as a parameter.
        Specified by:
        wrapInIfNeeded in interface Terminal
        Throws:
        java.io.IOException