Commit 21691f0b authored by Stephane Nicoll's avatar Stephane Nicoll

Merge branch '1.5.x' into 2.0.x

parents fbf3c48b 2135f7fd
...@@ -30,12 +30,19 @@ import java.util.zip.InflaterInputStream; ...@@ -30,12 +30,19 @@ import java.util.zip.InflaterInputStream;
*/ */
class ZipInflaterInputStream extends InflaterInputStream { class ZipInflaterInputStream extends InflaterInputStream {
private final Inflater inflater;
private boolean extraBytesWritten; private boolean extraBytesWritten;
private int available; private int available;
ZipInflaterInputStream(InputStream inputStream, int size) { ZipInflaterInputStream(InputStream inputStream, int size) {
super(inputStream, new Inflater(true), getInflaterBufferSize(size)); this(inputStream, new Inflater(true), size);
}
private ZipInflaterInputStream(InputStream inputStream, Inflater inflater, int size) {
super(inputStream, inflater, getInflaterBufferSize(size));
this.inflater = inflater;
this.available = size; this.available = size;
} }
...@@ -56,6 +63,12 @@ class ZipInflaterInputStream extends InflaterInputStream { ...@@ -56,6 +63,12 @@ class ZipInflaterInputStream extends InflaterInputStream {
return result; return result;
} }
@Override
public void close() throws IOException {
super.close();
this.inflater.end();
}
@Override @Override
protected void fill() throws IOException { protected void fill() throws IOException {
try { try {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment