X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Futils%2FNextableInputStream.java;h=7e2766ad950d6f10efa0dbd5c16214ebcb581605;hb=eeb2cc17c4dbbbf9eb7f4c6ef695226a66fbf106;hp=37322c9e8e0d7c5f7b651f44a817aecbe6469e5b;hpb=eeaa5ebc0ebe6ffd860273ed6727024737085a25;p=fanfix.git diff --git a/src/be/nikiroo/utils/NextableInputStream.java b/src/be/nikiroo/utils/NextableInputStream.java index 37322c9..7e2766a 100644 --- a/src/be/nikiroo/utils/NextableInputStream.java +++ b/src/be/nikiroo/utils/NextableInputStream.java @@ -111,6 +111,20 @@ public class NextableInputStream extends BufferedInputStream { return next(true); } + /** + * 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 + */ + @Override + public boolean eof() { + return super.eof(); + } + /** * Check if we still have some data in the buffer and, if not, fetch some. *