Thanks Karl. I used ByteArrayInputStream and it is now working !
Thanks again, -Vinay. --- Karl_�ie <[EMAIL PROTECTED]> wrote: > The org.apache.lucene.store.InputStream is not a > _stream_ per see as it > requires a seek() function and it is therefore not > compatible with the > java.io.InputStream consept, however you can quite > easily create a > java.io.InputStream by grabbing hold of the byte > content of a > org.apache.lucene.store.InputStream and stuff it > into a > java.io.ByteArrayInputStream. > > This doesn't make any sense anyhow because the raw > bytestream from a > RAMDirectory will not make any real sense to a HTML > parser because the > content of the RAMDir is an binary index. If you > want to store the > input HTML documents you should store them into a > byte or char array in > a file or database. > > mvh karl �ie > > > > On Monday, Nov 18, 2002, at 03:24 Europe/Oslo, Vinay > Kakade wrote: > > > Hi > > I am trying to use RAMDirectory to store the input > > HTML documents which are used to create index by > the > > IndexHTML demo program, but I am facing problems. > > I tried to get individual InputStream objects for > > individual files from RAMDirectory & pass it to > > HTMLParser class to parse the file, but the > HTMLParser > > class accepts java.io.InputStream object while > > RAMDirectory returns lucene.store.InputStream > object. > > Is there any way to perform any conversion between > > there two objects? or do I have to modify > HTMLParser > > class & all other classes it uses to achieve > this?? > > Please let me know > > regards > > Vinay. > > > > > > --- Otis Gospodnetic <[EMAIL PROTECTED]> > > wrote: > >> Look at RAMDirectory. > >> > >> Otis > >> > >> --- Vinay Kakade <[EMAIL PROTECTED]> wrote: > >>> Hi, > >>> > >>> I want to use Lucene for indexing some documents > >> which > >>> are in memory. I do not want to store them in a > >>> seperate directory. > >>> The IndexWriter class accepts directory name, > >> where > >>> all documents to be indexed are stored. Is there > >> any > >>> way by which we can specify memory buffer in > which > >>> documents are stored while creating Index? > >>> Thanks > >>> Vinay. > >>> > >>> > >>> > __________________________________________________ > >>> Do you Yahoo!? > >>> Yahoo! Web Hosting - Let the expert host your > site > >>> http://webhosting.yahoo.com > >>> > >>> -- > >>> To unsubscribe, e-mail: > >>> > >> > <mailto:[EMAIL PROTECTED]> > >>> For additional commands, e-mail: > >>> <mailto:[EMAIL PROTECTED]> > >>> > >> > >> > >> > __________________________________________________ > >> Do you Yahoo!? > >> Yahoo! Web Hosting - Let the expert host your > site > >> http://webhosting.yahoo.com > >> > >> -- > >> To unsubscribe, e-mail: > >> > <mailto:[EMAIL PROTECTED]> > >> For additional commands, e-mail: > >> <mailto:[EMAIL PROTECTED]> > >> > > > > > > __________________________________________________ > > Do you Yahoo!? > > Yahoo! Web Hosting - Let the expert host your site > > http://webhosting.yahoo.com > > > > -- > > To unsubscribe, e-mail: > > > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > > <mailto:[EMAIL PROTECTED]> > > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > __________________________________________________ Do you Yahoo!? Yahoo! Web Hosting - Let the expert host your site http://webhosting.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
