Strange. FileReader works fine in my java.net article code.


On Thursday, October 30, 2003, at 06:35 AM, Otis Gospodnetic wrote:


This is from Lucene demo, included in Lucene distribution.
Look at FileDocument class:

    // Add the contents of the file a field named "contents".  Use a
Text
    // field, specifying a Reader, so that the text of the file is
tokenized.
    // ?? why doesn't FileReader work here ??
    FileInputStream is = new FileInputStream(f);
    Reader reader = new BufferedReader(new InputStreamReader(is));
    doc.add(Field.Text("contents", reader));

Otis



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to