org.crsh.term.console
Class Console

java.lang.Object
  extended by org.crsh.term.console.Console

public final class Console
extends Object

This class provides an abstraction for a console. This implementation wraps the input and output of a terminal based on a bidirectional io.

Interactions between terminal and console are done though the ViewReader and ViewWriter classes.

Version:
$Revision$
Author:
Julien Viet

Constructor Summary
Console(ViewWriter viewWriter)
           
 
Method Summary
 void clearBuffer()
          Clears the buffer without doing any echoing.
 CharSequence getBuffer()
           
 CharSequence getBufferToCursor()
           
 ConsoleReader getReader()
          Returns the console reader.
 ViewReader getViewReader()
           
 ConsoleWriter getWriter()
           
 boolean isEchoing()
           
 void setEchoing(boolean echoing)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Console

public Console(ViewWriter viewWriter)
Method Detail

clearBuffer

public void clearBuffer()
Clears the buffer without doing any echoing.


getBuffer

public CharSequence getBuffer()

getBufferToCursor

public CharSequence getBufferToCursor()

isEchoing

public boolean isEchoing()

setEchoing

public void setEchoing(boolean echoing)

getReader

public ConsoleReader getReader()
Returns the console reader.

Returns:
the console reader

getViewReader

public ViewReader getViewReader()

getWriter

public ConsoleWriter getWriter()


Copyright © 2011 eXo Platform SAS. All Rights Reserved.