public String nextToken() throws NoSuchElementException {
  if (pos < len && delim.indexOf(str.charAt(pos)) >= 0) {
    if (retDelims)     return str.substring(pos,++pos);
    while (++pos < len && delim.indexOf(str.charAt(pos)) >= 0)     ;
  }
  if (pos < len) {
    int start=pos;
    while (++pos < len && delim.indexOf(str.charAt(pos)) < 0)     ;
    return str.substring(start,pos);
  }
  throw new NoSuchElementException();
}

public String nextToken ( ) throws NoSuchElementException { if ( pos < len && delim . indexOf ( str . charAt ( pos ) ) >= 0 ) { if ( retDelims ) return str . substring ( pos , ++ pos ) ; while ( ++ pos < len && delim . indexOf ( str . charAt ( pos ) ) >= 0 ) ; } if ( pos < len ) { int start = pos ; while ( ++ pos < len && delim . indexOf ( str . charAt ( pos ) ) < 0 ) ; return str . substring ( start , pos ) ; } throw new NoSuchElementException ( ) ; }
returns the nexttoken of the string .
