|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectutil.TokenizedLinesReader
public class TokenizedLinesReader
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 | |
---|---|
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 | |
---|---|
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 |
---|
public TokenizedLinesReader(java.io.Reader rdr, java.lang.String delimsre)
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 |
---|
public java.lang.String[] getLineAsTokens()
null
if the end
of the reader stream has been reached.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |