Index: src/java/org/apache/lucene/analysis/Tokenizer.java =================================================================== --- src/java/org/apache/lucene/analysis/Tokenizer.java (revision 797721) +++ src/java/org/apache/lucene/analysis/Tokenizer.java (working copy) @@ -38,16 +38,34 @@ /** Construct a tokenizer with null input. */ protected Tokenizer() {} - + /** Construct a token stream processing the given input. */ protected Tokenizer(Reader input) { this.input = CharReader.get(input); } + /** Construct a token stream processing the given input. */ protected Tokenizer(CharStream input) { this.input = input; } + /** Construct a tokenizer with null input using the given AttributeFactory. */ + protected Tokenizer(AttributeFactory factory) { + super(factory); + } + + /** Construct a token stream processing the given input using the given AttributeFactory. */ + protected Tokenizer(AttributeFactory factory, Reader input) { + super(factory); + this.input = CharReader.get(input); + } + + /** Construct a token stream processing the given input using the given AttributeFactory. */ + protected Tokenizer(AttributeFactory factory, CharStream input) { + super(factory); + this.input = input; + } + /** By default, closes the input Reader. */ public void close() throws IOException { input.close();