@Override
	public boolean incrementToken() throws IOException {
		clearAttributes();
		while(!done){
			if(lexemeBuffer == null){
				count = input.read(charBuffer);
				lexemeBuffer = ypSegment.segment(charBuffer, 0, count);
			}else{
				if(index < lexemeBuffer.size()){
					Lexeme lexeme = lexemeBuffer.get(index);
					termAtt.append(lexeme.getLexemeText());
					offsetAtt.setOffset(lexeme.getBeginPosition()+offset, lexeme.getEndPosition()+offset);
					index++;
					return true;
				}else if(count == IO_BUFFER_SIZE){
					offset += IO_BUFFER_SIZE;
					lexemeBuffer = null;
					index = 0;
				}else{
					done = true;
				}
			}
		}
		return !done;
	}