X-Git-Url: http://git.nikiroo.be/?p=nikiroo-utils.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Futils%2FBufferedInputStream.java;h=9db12f1926cc372544998ae6128a20016370c0e7;hp=b236f8dac290d5406f18c8e758e62804a3f0af1c;hb=eeb2cc17c4dbbbf9eb7f4c6ef695226a66fbf106;hpb=eeaa5ebc0ebe6ffd860273ed6727024737085a25 diff --git a/src/be/nikiroo/utils/BufferedInputStream.java b/src/be/nikiroo/utils/BufferedInputStream.java index b236f8d..9db12f1 100644 --- a/src/be/nikiroo/utils/BufferedInputStream.java +++ b/src/be/nikiroo/utils/BufferedInputStream.java @@ -201,9 +201,6 @@ public class BufferedInputStream extends InputStream { /** * Check if this stream is totally spent (no more data to read or to * process). - *

- * 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 */ @@ -246,7 +243,7 @@ public class BufferedInputStream extends InputStream { 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; }