> What do you think about this solution and are there any other ways
> around this?

Couldn't you achieve the same effect with your own Reader class?  E.g.:

class MutableStringReader extends Reader {
  private String string;
  private int index;
  public void setString(String string) {
    this.string = string;
  }
  public int read(char[] dest, int off, int len) {
    int end = Math.min(string.length(), index+len);
    int size = end - index;
    if (size <= 0) return -1;
    string.getChars(index, end, dest, off);
    index += size;
    return size;
  }
  public void close() {}
}

Then call setString to modify the string before it is read.

Doug

_______________________________________________
Lucene-dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/lucene-dev

Reply via email to