Class ConsoleStreamIO

java.lang.Object
com.example.common.stream.ConsoleStreamIO
All Implemented Interfaces:
StreamIO

public class ConsoleStreamIO extends Object implements StreamIO
The ConsoleStreamIO class implements the StreamIO interface for interacting with the console input and output.
  • 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

      public String read()
      Read input from the input stream.
      Specified by:
      read in interface StreamIO
      Returns:
      the input read from the stream