|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Chat.TextConsole
Implementation of text based console. STDIN, STDOUT and STDERR streams are used to interact with the user.
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 |
|
Field Detail |
private java.io.BufferedReader in
BufferedReader
.private java.io.PrintWriter out
PrintWriter
.private java.io.PrintWriter err
PrintWriter
.Constructor Detail |
TextConsole()
Method Detail |
public java.lang.String readLine()
Console
readLine
in interface Console
Chat.Console
public void writeLine(java.lang.String message)
Console
writeLine
in interface Console
Chat.Console
message
- the line to be written.public void error(java.lang.String message)
Console
error
in interface Console
Chat.Console
message
- the message to be written.public void updateUserList(java.util.Collection list)
updateUserList
in interface Console
Chat.Console
list
- a collection of String
objects.public void setTitle(java.lang.String title)
setTitle
in interface Console
Chat.Console
title
- the desired title.public void close()
close
in interface Console
Chat.Console
title
- the desired title.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |