Logo Search packages:      
Sourcecode: jline version File versions  Download package

boolean jline::ConsoleReader::clearScreen (  )  throws IOException [inline]

Clear the screen by issuing the ANSI "clear screen" code.

Definition at line 768 of file ConsoleReader.java.

References flushConsole(), jline::Terminal::isANSISupported(), printString(), redrawLine(), and terminal.

Referenced by readLine().

            if (!terminal.isANSISupported ())
                  return false;

            // send the ANSI code to clear the screen
            printString (((char)27) + "[2J");
            flushConsole ();
            // then send the ANSI code to go to position 1,1
            printString (((char)27) + "[1;1H");
            flushConsole ();
            redrawLine ();

            return true;

Generated by  Doxygen 1.6.0   Back to index