Author: toad
Date: 2009-02-24 18:16:14 +0000 (Tue, 24 Feb 2009)
New Revision: 25784
Modified:
branches/db4o/freenet/src/freenet/support/io/BucketChainBucket.java
Log:
Comment, check for end in read() as well as read(byte[],int,int)
Modified: branches/db4o/freenet/src/freenet/support/io/BucketChainBucket.java
===================================================================
--- branches/db4o/freenet/src/freenet/support/io/BucketChainBucket.java
2009-02-24 16:59:41 UTC (rev 25783)
+++ branches/db4o/freenet/src/freenet/support/io/BucketChainBucket.java
2009-02-24 18:16:14 UTC (rev 25784)
@@ -110,6 +110,10 @@
} catch (EOFException e) {
// Handle the same
}
+ synchronized(BucketChainBucket.this) {
+ // No more data to read at the
moment.
+ if(readBytes >= size) return -1;
+ }
bucketNo++;
curBucketStream.close();
curBucketStream =
getBucketInputStream(bucketNo++);
@@ -155,6 +159,7 @@
// Handle the same
}
synchronized(BucketChainBucket.this) {
+ // No more data to read at the
moment.
if(readBytes >= size) return -1;
}
bucketNo++;
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs