[JDK-6341887] RFR: Patch V3: java.util.zip: Add ByteBuffer methods to Inflater/Deflater
David Lloyd
david.lloyd at redhat.com
Fri Mar 2 20:36:19 UTC 2018
On Fri, Mar 2, 2018 at 2:34 PM, David Lloyd <david.lloyd at redhat.com> wrote:
> On Fri, Mar 2, 2018 at 12:49 PM, Xueming Shen <xueming.shen at oracle.com> wrote:
>> Hi David,
>>
>> (1) Deflater.deflate(Bytebuffer)
>> the api doc regarding "no_flush" appears to be the copy/paste of the
>> byte[] version
>> without being updated to the corresponding ByteBuffer?
>
> You're right, I missed that one. I've incorporated this fix locally:
Oops, this should have been:
--- 8< --- cut here --- 8< ---
diff --git a/src/java.base/share/classes/java/util/zip/Deflater.java
b/src/java.base/share/classes/java/util/zip/Deflater.java
index 524125787a8..40f0d9736e2 100644
--- a/src/java.base/share/classes/java/util/zip/Deflater.java
+++ b/src/java.base/share/classes/java/util/zip/Deflater.java
@@ -481,9 +481,9 @@ public class Deflater {
* in order to determine if more input data is required.
*
* <p>This method uses {@link #NO_FLUSH} as its compression flush mode.
- * An invocation of this method of the form {@code deflater.deflate(b)}
+ * An invocation of this method of the form {@code
deflater.deflate(output)}
* yields the same result as the invocation of
- * {@code deflater.deflate(b, 0, b.length, Deflater.NO_FLUSH)}.
+ * {@code deflater.deflate(output, Deflater.NO_FLUSH)}.
*
* @param output the buffer for the compressed data
* @return the actual number of bytes of compressed data written to the
--- 8< --- cut here --- 8< ---
--
- DML
More information about the core-libs-dev
mailing list