DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26699>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26699

Tokenizer Enhancements: reset input string, static CSV/TSV factories





------- Additional Comments From [EMAIL PROTECTED]  2004-02-05 21:04 -------
Tokenizer is missing the following features (sorry, hit commit by accident)

1.  Reset of the input string to a new value.  This would be helpful
    when parsing large files, as you could use the same tokenizer instance
    on each line of the file by reseting the input on the tokenizer, instead
    of creating a new instance for each line:

    while ((line = reader.readLine()) != null)
    {
       tokenizer.reset(line);
       tokens = tokenizer.getAllTokens();
    }

2.  I have also added static factory methods for Comma Separated and
    Tab Separated values tokenizers.  This is accomplished by implementing
    Cloneable, and having private static instances configured for these
    types, and returning clones when an instance is requested:

    Tokenizer csv = Tokenizer.getCSVInstance(input);

Please see the attached file, created with the command
diff -u Tokenizer.java

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to