/**
* Check if this stream is totally spent (no more data to read or to
* process).
- * <p>
- * Note: an empty stream that is still not started will return FALSE, as we
- * don't know yet if it is empty.
*
* @return TRUE if it is
*/
if (hasMoreData()) {
int now = Math.min(blen, len) - pos;
if (now > 0) {
- System.arraycopy(buffer, pos, b, boff, now);
+ System.arraycopy(buffer, pos, b, boff + done, now);
pos += now;
done += now;
}
return next(true);
}
+ /**
+ * Check if this stream is totally spent (no more data to read or to
+ * process).
+ * <p>
+ * Note: an empty stream that is still not started will return FALSE, as we
+ * don't know yet if it is empty.
+ *
+ * @return TRUE if it is
+ */
+ @Override
+ public boolean eof() {
+ return super.eof();
+ }
+
/**
* Check if we still have some data in the buffer and, if not, fetch some.
*