Class ConsoleReader

java.lang.Object
org.basex.util.ConsoleReader
All Implemented Interfaces:
AutoCloseable, PasswordReader

public abstract class ConsoleReader extends Object implements AutoCloseable, PasswordReader
Console reader.
Author:
BaseX Team 2005-21, BSD License, Dimitar Popov
  • Constructor Details

    • ConsoleReader

      public ConsoleReader()
  • Method Details

    • readLine

      public abstract String readLine(String prompt)
      Reads next line. If no input, then the method blocks the thread.
      Parameters:
      prompt - prompt
      Returns:
      next line or null if EOF is reached
    • close

      public abstract void close()
      Specified by:
      close in interface AutoCloseable
    • get

      public static ConsoleReader get()
      Creates a new instance.
      Returns:
      instance of console reader