small bugfix to readFully

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@851 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 20 years ago
parent 6d5d0ac801
commit f6a0e0f162

@ -69,6 +69,7 @@ abstract class kelondroAbstractRA implements kelondroRA {
// derived methods: // derived methods:
public void readFully(byte[] b, int off, int len) throws IOException { public void readFully(byte[] b, int off, int len) throws IOException {
int r = read(b, off, len); int r = read(b, off, len);
if (r < 0) return; // read exceeded EOF
if (r < len) readFully(b, off + r, len - r); if (r < len) readFully(b, off + r, len - r);
} }

Loading…
Cancel
Save