Chat
Class TextConsole

java.lang.Object
  |
  +--Chat.TextConsole
All Implemented Interfaces:
Console

class TextConsole
extends java.lang.Object
implements Console

Implementation of text based console. STDIN, STDOUT and STDERR streams are used to interact with the user.

See Also:
AWTConsole

Field Summary
private  java.io.PrintWriter err
          STDERR output stream stored as a PrintWriter.
private  java.io.BufferedReader in
          STDIN input stream stored as a BufferedReader.
private  java.io.PrintWriter out
          STDOUT output stream stored as a PrintWriter.
 
Constructor Summary
(package private) TextConsole()
          Initializes member variables with system standard streams.
 
Method Summary
 void close()
          Implementation is empty in this class.
 void error(java.lang.String message)
          Writes an error message to the console.
 java.lang.String readLine()
          Reads a line from the console, blocks until it is available.
 void setTitle(java.lang.String title)
          Implementation is empty in this class.
 void updateUserList(java.util.Collection list)
          Implementation is empty in this class.
 void writeLine(java.lang.String message)
          Writes a line to the console.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

in

private java.io.BufferedReader in
STDIN input stream stored as a BufferedReader.

out

private java.io.PrintWriter out
STDOUT output stream stored as a PrintWriter.

err

private java.io.PrintWriter err
STDERR output stream stored as a PrintWriter.
Constructor Detail

TextConsole

TextConsole()
Initializes member variables with system standard streams.
Method Detail

readLine

public java.lang.String readLine()
Description copied from interface: Console
Reads a line from the console, blocks until it is available.
Specified by:
readLine in interface Console
Following copied from interface: Chat.Console
Returns:
the line read.

writeLine

public void writeLine(java.lang.String message)
Description copied from interface: Console
Writes a line to the console.
Specified by:
writeLine in interface Console
Following copied from interface: Chat.Console
Parameters:
message - the line to be written.

error

public void error(java.lang.String message)
Description copied from interface: Console
Writes an error message to the console.
Specified by:
error in interface Console
Following copied from interface: Chat.Console
Parameters:
message - the message to be written.

updateUserList

public void updateUserList(java.util.Collection list)
Implementation is empty in this class.
Specified by:
updateUserList in interface Console
Following copied from interface: Chat.Console
Parameters:
list - a collection of String objects.

setTitle

public void setTitle(java.lang.String title)
Implementation is empty in this class.
Specified by:
setTitle in interface Console
Following copied from interface: Chat.Console
Parameters:
title - the desired title.

close

public void close()
Implementation is empty in this class.
Specified by:
close in interface Console
Following copied from interface: Chat.Console
Parameters:
title - the desired title.