On Mon, Feb 04, 2002 at 12:03:49PM -0500, Gianni Johansson wrote:
> On Sunday 03 February 2002 23:19, you wrote:
> > On Sun, Feb 03, 2002 at 01:10:25PM -0500, Gianni Johansson wrote:
> > > FSBucketFactory.FSBucket.resetWrite() doesn't work (NOP) and
> > > FSBucketFactory.FSBucket.size() returns the buffer size, not the
> > > amount of data in the bucket.
> >
> > Yeah, I know.  It's rather an unreasonable interface imho.  I have never
> > needed to use either of those methods.   Do you really need them?
> 
> Yes. They are used by client code. You use Bucket.size() yourself in 
> InternalClient.  I don't think Bucket was ever intended to be used by core 
> code (but I'm sure I will hear from Oskar if I am wrong ;-) ).

But the way I use Bucket.size(), the value I want is the total buffer
size (i.e. after it's filled).  I don't see why you wouldn't want it
that way.  If you've partially filled it and you want to know how much,
count the bytes yourself.

> How do you handle restart after DNV's in InternalClient without resetWrite()?

The FSBucket semantics effectively imply a resetWrite() call immediately
before getOutputStream().

What would be a bitch to implement would be making it append if you
don't call resetWrite().  And I don't believe that's needed anywhere in
our codebase anyway (i.e., we always want to resetWrite()).

-tc


_______________________________________________
Devl mailing list
Devl at freenetproject.org
http://lists.freenetproject.org/mailman/listinfo/devl

Reply via email to