Package java.util.zip
Class ZipFile.ZipInflaterInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- java.util.zip.InflaterInputStream
-
- java.util.zip.ZipFile.ZipInflaterInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
- Enclosing class:
- ZipFile
public static class ZipFile.ZipInflaterInputStream extends InflaterInputStream
-
-
Field Summary
-
Fields inherited from class java.util.zip.InflaterInputStream
buf, inf, len
-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description ZipInflaterInputStream(InputStream is, Inflater inf, int bsize, ZipEntry entry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()Returns 0 when when this stream has exhausted its input; and 1 otherwise.intread(byte[] buffer, int byteOffset, int byteCount)Reads up tobyteCountbytes of decompressed data and stores it inbufferstarting atbyteOffset.-
Methods inherited from class java.util.zip.InflaterInputStream
close, fill, mark, markSupported, read, reset, skip
-
Methods inherited from class java.io.InputStream
read
-
-
-
-
Constructor Detail
-
ZipInflaterInputStream
public ZipInflaterInputStream(InputStream is, Inflater inf, int bsize, ZipEntry entry)
-
-
Method Detail
-
read
public int read(byte[] buffer, int byteOffset, int byteCount) throws IOExceptionDescription copied from class:InflaterInputStreamReads up tobyteCountbytes of decompressed data and stores it inbufferstarting atbyteOffset. Returns the number of uncompressed bytes read, or -1.- Overrides:
readin classInflaterInputStream- Throws:
IOException- if the stream is closed or another IOException occurs.
-
available
public int available() throws IOExceptionDescription copied from class:InflaterInputStreamReturns 0 when when this stream has exhausted its input; and 1 otherwise. A result of 1 does not guarantee that further bytes can be returned, with or without blocking.Although consistent with the RI, this behavior is inconsistent with
InputStream.available(), and violates the Liskov Substitution Principle. This method should not be used.- Overrides:
availablein classInflaterInputStream- Returns:
- 0 if no further bytes are available. Otherwise returns 1, which suggests (but does not guarantee) that additional bytes are available.
- Throws:
IOException- if this stream is closed or an error occurs
-
-