Class ReaderInput

java.lang.Object
eu.bandm.tools.util.files.ReaderInput
All Implemented Interfaces:
TextInput, AutoCloseable

class ReaderInput extends Object implements TextInput
Subclass which uses a Reader for input.
  • Field Details

    • reader

      final Reader reader
      The reader given on construction
    • info

      @Opt final @Opt String info
      The human-read source info, as used in error messages, etc.
  • Constructor Details

    • ReaderInput

      ReaderInput(Reader reader, @Opt @Opt String info)
      Only constructor.
      Parameters:
      reader - to read from
      info - the human-read source info, as used in error messages, etc.
  • Method Details

    • getReader

      public Reader getReader()
      Deliver the stream of decoded characters.
      Specified by:
      getReader in interface TextInput
      Returns:
      the stream of decoded characters.
    • getInfo

      @Opt public @Opt String getInfo()
      Deliver a human readable text for the source identification.
      Specified by:
      getInfo in interface TextInput
      Returns:
      a human readable text for the source identification.