
net.java.truevfs.comp.zip.ZipInflaterInputStream Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of truevfs-comp-zip Show documentation
Show all versions of truevfs-comp-zip Show documentation
Provides basic functionality for reading and writing ZIP files.
/*
* Copyright (C) 2005-2015 Schlichtherle IT Services.
* All rights reserved. Use is subject to license terms.
*/
package net.java.truevfs.comp.zip;
import edu.umd.cs.findbugs.annotations.CleanupObligation;
import edu.umd.cs.findbugs.annotations.CreatesObligation;
import edu.umd.cs.findbugs.annotations.DischargesObligation;
import java.io.IOException;
import java.io.InputStream;
import java.util.zip.Inflater;
import java.util.zip.InflaterInputStream;
import javax.annotation.WillCloseWhenClosed;
/**
* An inflater input stream which uses a custom {@link Inflater} and provides
* access to it.
*
* @author Christian Schlichtherle
*/
@CleanupObligation
final class ZipInflaterInputStream extends InflaterInputStream {
@CreatesObligation
ZipInflaterInputStream(@WillCloseWhenClosed InputStream in, int size) {
super(in, new Inflater(true), size);
}
Inflater getInflater() {
return inf;
}
@Override
@DischargesObligation
public void close() throws IOException {
super.close();
inf.end();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy