Package java.util.zip

Class ZipFile.ZipInflaterInputStream

    • Method Detail

      • read

        public int read​(byte[] buffer,
                        int byteOffset,
                        int byteCount)
                 throws IOException
        Description copied from class: InflaterInputStream
        Reads up to byteCount bytes of decompressed data and stores it in buffer starting at byteOffset. Returns the number of uncompressed bytes read, or -1.
        Overrides:
        read in class InflaterInputStream
        Throws:
        IOException - if the stream is closed or another IOException occurs.
      • available

        public int available()
                      throws IOException
        Description copied from class: InflaterInputStream
        Returns 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:
        available in class InflaterInputStream
        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