Please take a review at http://cr.openjdk.java.net/~weijun/8234267/webrev.00/
Here, the returnDelims argument of the StringTokenizer is true so that we can detect duplicated delimiters. If I understand correctly, after every non-delimiter token, the next one MUST be a delimiter. Therefore I haven't checked the 3rd, 5th, and the 7th. Please confirm this is correct. Thanks, Max