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.
This commit is contained in:
Joel Dice 2016-08-23 22:33:16 -06:00
parent a2c0319af2
commit 212e1977aa

View File

@ -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()) {