public void clear ( ) { if ( buffer . size ( ) > 0 ) { terminal . format ( "\r%s" , CURSOR_ERASE ) ; for ( int i = 1 ; i < buffer . size ( ) ; ++ i ) { terminal . format ( "%s%s" , UP , CURSOR_ERASE ) ; } buffer . clear ( ) ; } }
Clear the entire buffer and the terminal area it represents .