lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehatc...@apache.org
Subject svn commit: r153412 - lucene/java/trunk/contrib/analyzers/src/java/org/apache/lucene/analysis/KeywordTokenizer.java
Date Fri, 11 Feb 2005 15:30:16 GMT
Author: ehatcher
Date: Fri Feb 11 07:30:14 2005
New Revision: 153412

URL: http://svn.apache.org/viewcvs?view=rev&rev=153412
Log:
add customizable buffer size

Modified:
    lucene/java/trunk/contrib/analyzers/src/java/org/apache/lucene/analysis/KeywordTokenizer.java

Modified: lucene/java/trunk/contrib/analyzers/src/java/org/apache/lucene/analysis/KeywordTokenizer.java
URL: http://svn.apache.org/viewcvs/lucene/java/trunk/contrib/analyzers/src/java/org/apache/lucene/analysis/KeywordTokenizer.java?view=diff&r1=153411&r2=153412
==============================================================================
--- lucene/java/trunk/contrib/analyzers/src/java/org/apache/lucene/analysis/KeywordTokenizer.java
(original)
+++ lucene/java/trunk/contrib/analyzers/src/java/org/apache/lucene/analysis/KeywordTokenizer.java
Fri Feb 11 07:30:14 2005
@@ -20,11 +20,19 @@
  */
 
 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 {



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message