Hi,
is it possible to upgrade the API-doc, that a Buffered Reader is a must.
Who is responsible for closing the InputStream? Does doc.add() the close?
G�nter
----- Original Message -----
From: "Erik Hatcher" <[EMAIL PROTECTED]>
To: "Lucene Users List" <[EMAIL PROTECTED]>
Sent: Thursday, October 30, 2003 1:19 PM
Subject: Re: Indexing txt-files
> 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]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]