lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roman Rokytskyy" <rrokyts...@yahoo.co.uk>
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 java.io. 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).

Thanks,
Roman Rokytskyy


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>


Mime
View raw message