@Override
    public boolean incrementToken() throws IOException {
        final ArrayDeque<String> tokens = getTokens();
        final CharTermAttribute termAtt = getTermAtt();
        if (tokens.isEmpty()) {
            String[] parts;
            skipCounter = 0;
            while (input.incrementToken()) {
                final String text = new String(termAtt.buffer(), 0, termAtt.length());
                if (text.isEmpty()) {
                    return true;
                }
                parts = text.split("[^a-zA-Z0-9]");
                if (parts.length == 0) {
                    skipCounter += posIncrementAttribute.getPositionIncrement();
                } else {
                    if (skipCounter != 0) {
                        posIncrementAttribute.setPositionIncrement(posIncrementAttribute.getPositionIncrement() + skipCounter);
                    }
                    for (String part : parts) {
                        if (!part.isEmpty()) {
                            tokens.add(part);
                        }
                    }
                    break;
                }
            }
        }
        return addTerm();
    }
@Test
    public void testIncrementToken() throws Exception {
        String[] expected = new String[6];
        expected[0] = "http";
        expected[1] = "www";
        expected[2] = "domain";
        expected[3] = "com";
        expected[4] = "test";
        expected[5] = "php";
        assertAnalyzesTo(analyzer, "http://www.domain.com/test.php", expected);
    }