Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
bugfix in kelondroRA (hint by Martin)
orbiter5dc0d419002b
diff --git a/source/de/anomic/kelondro/kelondroFileRA.java b/source/de/anomic/kelondro/kelondroFileRA.javaindex ee9b77957..9e8c07d90 100644--- a/source/de/anomic/kelondro/kelondroFileRA.java+++ b/source/de/anomic/kelondro/kelondroFileRA.java@@ -78,8 +78,7 @@ public class kelondroFileRA extends kelondroAbstractRA implements kelondroRA {// pseudo-native method readpublic int read() throws IOException {- //sync();- return RAFile.read();+ return RAFile.read();}// pseudo-native method write@@ -88,9 +87,7 @@ public class kelondroFileRA extends kelondroAbstractRA implements kelondroRA {}public int read(byte[] b, int off, int len) throws IOException {- //sync();- RAFile.read(b, off, len);- return len;+ return RAFile.read(b, off, len);}public void write(byte[] b, int off, int len) throws IOException {@@ -103,7 +100,6 @@ public class kelondroFileRA extends kelondroAbstractRA implements kelondroRA {}public void close() throws IOException {- //sync();RAFile.close();RAFile = null;}diff --git a/source/de/anomic/kelondro/kelondroRecords.java b/source/de/anomic/kelondro/kelondroRecords.javaindex 3016b6c3e..875c05009 100644--- a/source/de/anomic/kelondro/kelondroRecords.java+++ b/source/de/anomic/kelondro/kelondroRecords.java@@ -303,7 +303,7 @@ public class kelondroRecords {for (int i = 0; i < TXTPROPS.length; i++) {entryFile.seek(POS_TXTPROPS + TXTPROPW * i);TXTPROPS[i] = new byte[TXTPROPW];- entryFile.read(TXTPROPS[i], 0, TXTPROPS[i].length);+ entryFile.readFully(TXTPROPS[i], 0, TXTPROPS[i].length);}// assign remaining values that are only present at run-time@@ -526,7 +526,7 @@ public class kelondroRecords {synchronized (entryFile) {entryFile.seek(seekpos(this.handle));entryFile.readFully(this.headChunk, 0, this.headChunk.length);- //entryFile.read(this.tailChunk, 0, this.tailChunk.length);+ //entryFile.readFully(this.tailChunk, 0, this.tailChunk.length);}this.headChanged = true; // provoke a cache storecp = CP_HIGH;@@ -630,7 +630,7 @@ public class kelondroRecords {// read valuessynchronized (entryFile) {entryFile.seek(seekpos(this.handle) + headchunksize);- entryFile.read(this.tailChunk, 0, this.tailChunk.length);+ entryFile.readFully(this.tailChunk, 0, this.tailChunk.length);}}