org.apache.jackrabbit.core.query.lucene.fulltext
Class FastCharStream

java.lang.Object
  extended byorg.apache.jackrabbit.core.query.lucene.fulltext.FastCharStream

public final class FastCharStream
extends Object

Modified version of org.apache.lucene.queryParser.FastCharStream based on a String input.

An efficient implementation of JavaCC's CharStream interface.

Note that this does not do line-number counting, but instead keeps track of the character position of the token in the input, as required by Lucene's Token API.


Constructor Summary
FastCharStream(String input)
          Constructs from a String.
 
Method Summary
 void backup(int amount)
           
 char BeginToken()
           
 void Done()
           
 int getBeginColumn()
           
 int getBeginLine()
           
 int getColumn()
           
 int getEndColumn()
           
 int getEndLine()
           
 String GetImage()
           
 int getLine()
           
 char[] GetSuffix(int len)
           
 char readChar()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FastCharStream

public FastCharStream(String input)
Constructs from a String.

Method Detail

readChar

public final char readChar()
                    throws IOException
Throws:
IOException

BeginToken

public final char BeginToken()
                      throws IOException
Throws:
IOException

backup

public final void backup(int amount)

GetImage

public final String GetImage()

GetSuffix

public final char[] GetSuffix(int len)

Done

public final void Done()

getColumn

public final int getColumn()

getLine

public final int getLine()

getEndColumn

public final int getEndColumn()

getEndLine

public final int getEndLine()

getBeginColumn

public final int getBeginColumn()

getBeginLine

public final int getBeginLine()


Copyright © 2004-2006 The Apache Software Foundation. All Rights Reserved.