org.crsh.term.spi
Interface TermIO

All Known Implementing Classes:
SSHIO, TelnetIO

public interface TermIO

The input/output of a term.

Version:
$Revision$
Author:
Julien Viet

Method Summary
 void close()
          Close the input/output.
 CodeType decode(int code)
          Decode the intput value.
 void flush()
          Flush output.
 boolean moveLeft()
          Move the cursor left.
 boolean moveRight()
          Move the cursor right.
 int read()
          Reads an input value.
 void write(char c)
          Write a char.
 void write(String s)
          Write a string.
 void writeCRLF()
          Write a CRLF.
 void writeDel()
          Delete the char.
 

Method Detail

read

int read()
         throws IOException
Reads an input value.

Returns:
the value read
Throws:
IOException - any io exception

decode

CodeType decode(int code)
Decode the intput value.

Parameters:
code - the code
Returns:
the input value type

close

void close()
Close the input/output.


flush

void flush()
           throws IOException
Flush output.

Throws:
IOException - any io exception

write

void write(String s)
           throws IOException
Write a string.

Parameters:
s - the string to write
Throws:
IOException - any io exception

write

void write(char c)
           throws IOException
Write a char.

Parameters:
c - the char to write
Throws:
IOException - any io exception

writeDel

void writeDel()
              throws IOException
Delete the char.

Throws:
IOException - any io exception

writeCRLF

void writeCRLF()
               throws IOException
Write a CRLF.

Throws:
IOException - any io exception

moveRight

boolean moveRight()
                  throws IOException
Move the cursor right.

Returns:
true if the cursor moved.
Throws:
IOException - any io exception

moveLeft

boolean moveLeft()
                 throws IOException
Move the cursor left.

Returns:
true if the cursor moved
Throws:
IOException - any io exception


Copyright © 2010 eXo Platform SAS. All Rights Reserved.