if (charsRead < 0) {
throw new RuntimeException("Could not read the text");
}
long numOfWordsInText = 0;
char[] actualTextBuffer = charsRead < textBuffer.length ? Arrays.copyOf(textBuffer, charsRead) : textBuffer;
WordIterator wordIterator = new WordIterator(actualTextBuffer, Collections.<String>emptySet());
String prev = null;
while (wordIterator.hasNext()) {
String word = wordIterator.next().toString().toLowerCase();
if (prev != null) {
if (readData) {
if (dataType == DataType.LONG_COUNT) {
dataInterface.readCount(prev + " " + word);
} else {