really fix single-byte read when nothing has been read
@@ -59,7 +59,7 @@ public synchronized int read() throws IOException {
}
int read = read(loc, singleByteBuffer);
if (read < 1) {
- return read;
+ return -1;
}
loc++;
return singleByteBuffer.get() & 0xff;
