Package javax0.repl

Class BufferedReaderConsole

  • All Implemented Interfaces:
    LocalConsole

    public class BufferedReaderConsole
    extends java.lang.Object
    implements LocalConsole
    LocalConsole implementation that uses System.in and System.out
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String readLine​(java.lang.String msg)
      Read a line from the console.
      java.io.PrintWriter writer()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BufferedReaderConsole

        public BufferedReaderConsole()
    • Method Detail

      • writer

        public java.io.PrintWriter writer()
        Specified by:
        writer in interface LocalConsole
        Returns:
        the print writer to the console.
      • readLine

        public java.lang.String readLine​(java.lang.String msg)
        Description copied from interface: LocalConsole
        Read a line from the console. This is not to be used by the commands only in case of special situations.
        Specified by:
        readLine in interface LocalConsole
        Parameters:
        msg - the message printed to the consule as a special prompt.
        Returns:
        the line read