- All Implemented Interfaces:
StreamIO
The ConsoleStreamIO class implements the StreamIO interface for interacting with the console input and output.
-
Constructor Summary
Constructors
-
Method Summary
void
Print the specified text to the output stream.
Read input from the input stream.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ConsoleStreamIO
public ConsoleStreamIO()
-
Method Details
-
print
public void print(String text)
Print the specified text to the output stream.
- Specified by:
print
in interface StreamIO
- Parameters:
text
- the text to print
-
read
Read input from the input stream.
- Specified by:
read
in interface StreamIO
- Returns:
- the input read from the stream