mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Merge branch '1.5.x' into 2.0.x
This commit is contained in:
commit
21691f0b20
@ -30,12 +30,19 @@ import java.util.zip.InflaterInputStream;
|
||||
*/
|
||||
class ZipInflaterInputStream extends InflaterInputStream {
|
||||
|
||||
private final Inflater inflater;
|
||||
|
||||
private boolean extraBytesWritten;
|
||||
|
||||
private int available;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@ -56,6 +63,12 @@ class ZipInflaterInputStream extends InflaterInputStream {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
super.close();
|
||||
this.inflater.end();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void fill() throws IOException {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user