mirror of https://github.com/apache/lucene.git
add customizable buffer size
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@153412 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cd0d0937e1
commit
f375d09898
|
@ -20,11 +20,19 @@ import java.io.Reader;
|
|||
*/
|
||||
|
||||
public class KeywordTokenizer extends Tokenizer {
|
||||
private static final int DEFAULT_BUFFER_SIZE=256;
|
||||
|
||||
private boolean done;
|
||||
private final char[] buffer = new char[1024];
|
||||
private final char[] buffer;
|
||||
|
||||
public KeywordTokenizer(Reader input) {
|
||||
this(input, DEFAULT_BUFFER_SIZE);
|
||||
}
|
||||
|
||||
public KeywordTokenizer(Reader input, int bufferSize) {
|
||||
super(input);
|
||||
this.buffer=new char[bufferSize];
|
||||
this.done=false;
|
||||
}
|
||||
|
||||
public Token next() throws IOException {
|
||||
|
|
Loading…
Reference in New Issue