Class ReaderInput

    • Constructor Detail

      • ReaderInput

        public ReaderInput​(java.io.Reader reader)
    • Method Detail

      • directRead

        protected int directRead()
        Description copied from class: AbstractInput
        Tries to parse the next character without taking care of the peek deque.
        Specified by:
        directRead in class AbstractInput
        Returns:
        the next character, or -1 if the EOS has been reached
      • read

        public CharsWrapper read​(int n)
        Description copied from interface: CharacterInput
        Reads the next n characters, if possible. If there are less than n available characters, return all the remaining characters.
        Parameters:
        n - the number of characters to parse
        Returns:
        an array containing at most n characters, not null
      • readChars

        public CharsWrapper readChars​(int n)
        Description copied from interface: CharacterInput
        Reads the next n characters. If there isn't n available characters, this method throws an exception.
        Parameters:
        n - the number of characters to parse
        Returns:
        an array containing the next n characters, not null