util

## Class TokenizedLinesReader

- java.lang.Object
- - util.TokenizedLinesReader

-     public class TokenizedLinesReader
      extends java.lang.Object

  An instance of this class presents the lines of a given buffered reader as a sequence of token-string arrays. The format of a token is defined with reference to a set of delimiter characters specified by the client: each character sequence separated by a group of one or more delimiters is a token, and each individual delimiter character itself also qualifies as a token.

  Unitl 2007-02 this class was named StreamTokensReader.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TokenizedLinesReader(java.io.Reader rdr, java.lang.String delimsre)` Creates a new tokenized lines reader, backed by the given reader, and using the given regex for a non-empty sequence of delimiter characters.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String[]` | `getLineAsTokens()` Returns the next line, as an array of tokens;

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TokenizedLinesReader

          public TokenizedLinesReader(java.io.Reader rdr,
                                      java.lang.String delimsre)

      Creates a new tokenized lines reader, backed by the given reader, and using the given regex for a non-empty sequence of delimiter characters.
      Parameters:
        `rdr` - The base source Reader for this Reader.
        `delimsre` - Regular expression for a non-empty sequence of delimiter characters, of the form `"[...]+"`, to be used when tokenising the lines from the Reader.

  - ### Method Detail

    - #### getLineAsTokens

          public java.lang.String[] getLineAsTokens()

      Returns the next line, as an array of tokens;
      Returns:
        Array of token strings, or `null` if the end of the reader stream has been reached.