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:
Erik Hatcher 2005-02-11 15:30:14 +00:00
parent cd0d0937e1
commit f375d09898
1 changed files with 9 additions and 1 deletions

View File

@ -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 {