From 72f74df49afc4ce31bf0d696b603610a991da094 Mon Sep 17 00:00:00 2001 From: Lance Andersen Date: Thu, 3 Nov 2022 17:02:33 +0000 Subject: [PATCH] 8292427: Improve specification of InflaterInputStream.fill() Reviewed-by: bpb, alanb, simonis --- .../share/classes/java/util/zip/InflaterInputStream.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/java.base/share/classes/java/util/zip/InflaterInputStream.java b/src/java.base/share/classes/java/util/zip/InflaterInputStream.java index bab3bad55a3..d60b0447066 100644 --- a/src/java.base/share/classes/java/util/zip/InflaterInputStream.java +++ b/src/java.base/share/classes/java/util/zip/InflaterInputStream.java @@ -52,7 +52,7 @@ public class InflaterInputStream extends FilterInputStream { protected byte[] buf; /** - * Length of input buffer. + * The total number of bytes read into the input buffer. */ protected int len; @@ -251,7 +251,13 @@ public class InflaterInputStream extends FilterInputStream { /** * Fills input buffer with more data to decompress. + * @implSpec + * This method will read up to {@link #buf}.length bytes into the input + * buffer, {@link #buf}, starting at element {@code 0}. The {@link #len} + * field will be set to the number of bytes read. * @throws IOException if an I/O error has occurred + * @throws EOFException if the end of input stream has been reached + * unexpectedly */ protected void fill() throws IOException { ensureOpen();