fix for bug in kelondroAbstractRA.readFully

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5378 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 16 years ago
parent bd1dc9cd5d
commit 759cef23dd

@ -62,8 +62,10 @@ abstract class kelondroAbstractRA implements kelondroRA {
// derived methods:
public byte[] readFully() throws IOException {
final byte[] buffer = new byte[(int) this.available()];
this.readFully(buffer, 0, buffer.length);
int a = (int) this.available();
if (a <= 0) return null;
final byte[] buffer = new byte[a];
this.readFully(buffer, 0, a);
return buffer;
}

Loading…
Cancel
Save