bugfix in kelondroRA (hint by Martin)

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@847 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 20 years ago
parent 0c3a20d44f
commit 5dc0d41900

@ -78,8 +78,7 @@ public class kelondroFileRA extends kelondroAbstractRA implements kelondroRA {
// pseudo-native method read
public 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;
}

@ -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 store
cp = CP_HIGH;
@ -630,7 +630,7 @@ public class kelondroRecords {
// read values
synchronized (entryFile) {
entryFile.seek(seekpos(this.handle) + headchunksize);
entryFile.read(this.tailChunk, 0, this.tailChunk.length);
entryFile.readFully(this.tailChunk, 0, this.tailChunk.length);
}
}

Loading…
Cancel
Save