Class STTY


  • public class STTY
    extends java.lang.Object
    A terminal controller helper.
    • Constructor Detail

      • STTY

        public STTY()
      • STTY

        public STTY​(java.lang.Runtime runtime,
                    java.time.Clock clock)
    • Method Detail

      • toString

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

        public STTYModeSwitcher setSTTYMode​(STTYMode mode)
        Set the current STTY mode, and return the closable switcher to turn back.
        Parameters:
        mode - The STTY mode to set.
        Returns:
        The mode switcher.
      • getTerminalSize

        public TerminalSize getTerminalSize()
        Get the terminal size.
        Returns:
        the terminal size.
        Throws:
        java.io.UncheckedIOException - If getting the terminal size failed.
      • clearCachedTerminalSize

        public void clearCachedTerminalSize()
        Clear the cached terminal size regardless of when it was last checked.
      • isInteractive

        public boolean isInteractive()
        Returns:
        True if this is an interactive TTY terminal.