word = document.getText(currentWordPos, currentWordEnd);
word = document.getText(currentWordPos, currentWordEnd-currentWordPos);
  public String nextWord() {    if (!first) {      currentWordPos = nextWordPos;      currentWordEnd = getNextWordEnd(text, currentWordPos);      nextWordPos = getNextWordStart(text, currentWordEnd+1);    }    //The nextWordPos has already been populated    String word = null;    try {      word = document.getText(currentWordPos, currentWordEnd);    } catch (BadLocationException ex) {      moreTokens = false;    }    wordCount++;    first = false;    if (nextWordPos == -1)      moreTokens = false;    return word;  }