lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roman Rokytskyy" <>
Subject RE: InputStream handling problem
Date Thu, 25 Apr 2002 19:00:20 GMT
> Yes, I forgot about that one. It's even more interesting than that! The
> stream objects that Doug coded are not streams. They are
> wrappers on top of those. Each clone maintains it's own seek offset.
> Essentially, they share the same OS file handle but present an
> abstraction of multiple independent streams into the same file.

Sorry, but isn't file handle sharing something specific to FSInputStream?
Why do we force that on our abstract class level?

I would suggest a factory pattern, where input stream is created for a file,
and how this is handled is up to the implementation. FSDirectory will share
handles, RAMDirectory will have references to same RAMFile object, my
JDataStoreDirectory will rely on JDataStore to manage it effectively.

Should I try to rewrite it? (I also would appreciate your opinion if I
should try to touch that code at all).

Roman Rokytskyy

Do You Yahoo!?
Get your free address at

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message