From 212e1977aa598492fc829e6d9af2e745e48a57ee Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 23 Aug 2016 22:33:16 -0600 Subject: [PATCH] override write(byte[]) in DeflaterOutputStream Otherwise, it will inherit the version from FilterOutputStream, which is not consistent with the write(byte[],int,int) or write(int) implementations. --- classpath/java/util/zip/DeflaterOutputStream.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/classpath/java/util/zip/DeflaterOutputStream.java b/classpath/java/util/zip/DeflaterOutputStream.java index 3439330c97..dc6320fcbb 100644 --- a/classpath/java/util/zip/DeflaterOutputStream.java +++ b/classpath/java/util/zip/DeflaterOutputStream.java @@ -39,6 +39,10 @@ public class DeflaterOutputStream extends FilterOutputStream { write(buffer, 0, 1); } + public void write(byte[] b) throws IOException { + write(b, 0, b.length); + } + public void write(byte[] b, int offset, int length) throws IOException { // error condition checking if (deflater.finished()) {