# ZipInputStream

public class **ZipInputStream** extends [InflaterInputStream](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/InflaterInputStream.html)  

|---|---|---|
| Known Direct Subclasses [JarInputStream](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/jar/JarInputStream.html) |---|---| | [JarInputStream](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/jar/JarInputStream.html) | The `JarInputStream` class is used to read the contents of a JAR file from any input stream. | |||

This class implements an input stream filter for reading files in the
ZIP file format. Includes support for both compressed and uncompressed
entries.

### Constant Summary

|---|---|---|
| int | [CENATT](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#CENATT) |   |
| int | [CENATX](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#CENATX) |   |
| int | [CENCOM](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#CENCOM) |   |
| int | [CENCRC](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#CENCRC) |   |
| int | [CENDSK](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#CENDSK) |   |
| int | [CENEXT](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#CENEXT) |   |
| int | [CENFLG](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#CENFLG) |   |
| int | [CENHDR](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#CENHDR) |   |
| int | [CENHOW](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#CENHOW) |   |
| int | [CENLEN](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#CENLEN) |   |
| int | [CENNAM](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#CENNAM) |   |
| int | [CENOFF](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#CENOFF) |   |
| long | [CENSIG](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#CENSIG) |   |
| int | [CENSIZ](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#CENSIZ) |   |
| int | [CENTIM](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#CENTIM) |   |
| int | [CENVEM](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#CENVEM) |   |
| int | [CENVER](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#CENVER) |   |
| int | [ENDCOM](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#ENDCOM) |   |
| int | [ENDHDR](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#ENDHDR) |   |
| int | [ENDOFF](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#ENDOFF) |   |
| long | [ENDSIG](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#ENDSIG) |   |
| int | [ENDSIZ](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#ENDSIZ) |   |
| int | [ENDSUB](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#ENDSUB) |   |
| int | [ENDTOT](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#ENDTOT) |   |
| int | [EXTCRC](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#EXTCRC) |   |
| int | [EXTHDR](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#EXTHDR) |   |
| int | [EXTLEN](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#EXTLEN) |   |
| long | [EXTSIG](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#EXTSIG) |   |
| int | [EXTSIZ](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#EXTSIZ) |   |
| int | [LOCCRC](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#LOCCRC) |   |
| int | [LOCEXT](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#LOCEXT) |   |
| int | [LOCFLG](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#LOCFLG) |   |
| int | [LOCHDR](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#LOCHDR) |   |
| int | [LOCHOW](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#LOCHOW) |   |
| int | [LOCLEN](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#LOCLEN) |   |
| int | [LOCNAM](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#LOCNAM) |   |
| long | [LOCSIG](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#LOCSIG) |   |
| int | [LOCSIZ](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#LOCSIZ) |   |
| int | [LOCTIM](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#LOCTIM) |   |
| int | [LOCVER](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#LOCVER) |   |

### Inherited Field Summary

From class [java.util.zip.InflaterInputStream](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/InflaterInputStream.html)

|---|---|---|
| protected byte\[\] | [buf](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/InflaterInputStream.html#buf) | Input buffer for decompression. |
| protected boolean | [closed](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/InflaterInputStream.html#closed) | *This field is deprecated. This field will be removed from a future version of Android and should not be used. Subclasses that access this field need to be modified to keep track of their own closed state by overriding close().* |
| protected [Inflater](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/Inflater.html) | [inf](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/InflaterInputStream.html#inf) | Decompressor for this stream. |
| protected int | [len](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/InflaterInputStream.html#len) | Length of input buffer. |

From class [java.io.FilterInputStream](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/FilterInputStream.html)

|---|---|---|
| protected [InputStream](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/InputStream.html) | [in](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/FilterInputStream.html#in) | The input stream to be filtered. |

### Public Constructor Summary

|---|---|
|   | [ZipInputStream](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#ZipInputStream(java.io.InputStream))([InputStream](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/InputStream.html) in) Creates a new ZIP input stream. |
|   | [ZipInputStream](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#ZipInputStream(java.io.InputStream,%20java.nio.charset.Charset))([InputStream](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/InputStream.html) in, [Charset](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/charset/Charset.html) charset) Creates a new ZIP input stream. |

### Public Method Summary

|---|---|
| int | [available](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#available())() Returns 0 after EOF has reached for the current entry data, otherwise always return 1. |
| void | [close](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#close())() Closes this input stream and releases any system resources associated with the stream. |
| void | [closeEntry](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#closeEntry())() Closes the current ZIP entry and positions the stream for reading the next entry. |
| [ZipEntry](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html) | [getNextEntry](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#getNextEntry())() Reads the next ZIP file entry and positions the stream at the beginning of the entry data. |
| int | [read](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#read(byte[],%20int,%20int))(byte\[\] b, int off, int len) Reads from the current ZIP entry into an array of bytes. |
| long | [skip](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#skip(long))(long n) Skips specified number of bytes in the current ZIP entry. |

### Protected Method Summary

|---|---|
| [ZipEntry](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html) | [createZipEntry](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipInputStream.html#createZipEntry(java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name) Creates a new `ZipEntry` object for the specified entry name. |

### Inherited Method Summary

From class [java.util.zip.InflaterInputStream](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/InflaterInputStream.html)

|---|---|
| int | [available](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/InflaterInputStream.html#available())() Returns 0 after EOF has been reached, otherwise always return 1. |
| void | [close](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/InflaterInputStream.html#close())() Closes this input stream and releases any system resources associated with the stream. |
| void | [fill](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/InflaterInputStream.html#fill())() Fills input buffer with more data to decompress. |
| synchronized void | [mark](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/InflaterInputStream.html#mark(int))(int readlimit) Marks the current position in this input stream. |
| boolean | [markSupported](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/InflaterInputStream.html#markSupported())() Tests if this input stream supports the `mark` and `reset` methods. |
| int | [read](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/InflaterInputStream.html#read())() Reads a byte of uncompressed data. |
| int | [read](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/InflaterInputStream.html#read(byte[],%20int,%20int))(byte\[\] b, int off, int len) Reads uncompressed data into an array of bytes. |
| synchronized void | [reset](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/InflaterInputStream.html#reset())() Repositions this stream to the position at the time the `mark` method was last called on this input stream. |
| long | [skip](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/InflaterInputStream.html#skip(long))(long n) Skips specified number of bytes of uncompressed data. |

From class [java.io.FilterInputStream](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/FilterInputStream.html)

|---|---|
| int | [available](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/FilterInputStream.html#available())() Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream. |
| void | [close](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/FilterInputStream.html#close())() Closes this input stream and releases any system resources associated with the stream. |
| synchronized void | [mark](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/FilterInputStream.html#mark(int))(int readlimit) Marks the current position in this input stream. |
| boolean | [markSupported](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/FilterInputStream.html#markSupported())() Tests if this input stream supports the `mark` and `reset` methods. |
| int | [read](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/FilterInputStream.html#read())() Reads the next byte of data from this input stream. |
| int | [read](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/FilterInputStream.html#read(byte[],%20int,%20int))(byte\[\] b, int off, int len) Reads up to `len` bytes of data from this input stream into an array of bytes. |
| int | [read](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/FilterInputStream.html#read(byte[]))(byte\[\] b) Reads up to `byte.length` bytes of data from this input stream into an array of bytes. |
| synchronized void | [reset](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/FilterInputStream.html#reset())() Repositions this stream to the position at the time the `mark` method was last called on this input stream. |
| long | [skip](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/FilterInputStream.html#skip(long))(long n) Skips over and discards `n` bytes of data from the input stream. |

From class [java.io.InputStream](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/InputStream.html)

|---|---|
| int | [available](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/InputStream.html#available())() Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking by the next invocation of a method for this input stream. |
| void | [close](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/InputStream.html#close())() Closes this input stream and releases any system resources associated with the stream. |
| synchronized void | [mark](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/InputStream.html#mark(int))(int readlimit) Marks the current position in this input stream. |
| boolean | [markSupported](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/InputStream.html#markSupported())() Tests if this input stream supports the `mark` and `reset` methods. |
| abstract int | [read](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/InputStream.html#read())() Reads the next byte of data from the input stream. |
| int | [read](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/InputStream.html#read(byte[],%20int,%20int))(byte\[\] b, int off, int len) Reads up to `len` bytes of data from the input stream into an array of bytes. |
| int | [read](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/InputStream.html#read(byte[]))(byte\[\] b) Reads some number of bytes from the input stream and stores them into the buffer array `b`. |
| synchronized void | [reset](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/InputStream.html#reset())() Repositions this stream to the position at the time the `mark` method was last called on this input stream. |
| long | [skip](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/InputStream.html#skip(long))(long n) Skips over and discards `n` bytes of data from this input stream. |

From class [java.lang.Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html)

|---|---|
| [Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) | [clone](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#clone())() Creates and returns a copy of this `Object`. |
| boolean | [equals](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#equals(java.lang.Object))([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) obj) Compares this instance with the specified object and indicates if they are equal. |
| void | [finalize](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#finalize())() Invoked when the garbage collector has detected that this instance is no longer reachable. |
| final [Class](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html)\<?\> | [getClass](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#getClass())() Returns the unique instance of `https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html` that represents this object's class. |
| int | [hashCode](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#hashCode())() Returns an integer hash code for this object. |
| final void | [notify](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notify())() Causes a thread which is waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| final void | [notifyAll](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notifyAll())() Causes all threads which are waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [toString](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#toString())() Returns a string containing a concise, human-readable description of this object. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long,%20int))(long timeout, int nanos) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long))(long timeout) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait())() Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object. |

From interface [java.io.Closeable](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/Closeable.html)

|---|---|
| abstract void | [close](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/Closeable.html#close())() Closes this stream and releases any system resources associated with it. |

From interface [java.lang.AutoCloseable](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/AutoCloseable.html)

|---|---|
| abstract void | [close](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/AutoCloseable.html#close())() Closes this resource, relinquishing any underlying resources. |

## Constants

#### public static final int
**CENATT**

<br />

Constant Value: 36

#### public static final int
**CENATX**

<br />

Constant Value: 38

#### public static final int
**CENCOM**

<br />

Constant Value: 32

#### public static final int
**CENCRC**

<br />

Constant Value: 16

#### public static final int
**CENDSK**

<br />

Constant Value: 34

#### public static final int
**CENEXT**

<br />

Constant Value: 30

#### public static final int
**CENFLG**

<br />

Constant Value: 8

#### public static final int
**CENHDR**

<br />

Constant Value: 46

#### public static final int
**CENHOW**

<br />

Constant Value: 10

#### public static final int
**CENLEN**

<br />

Constant Value: 24

#### public static final int
**CENNAM**

<br />

Constant Value: 28

#### public static final int
**CENOFF**

<br />

Constant Value: 42

#### public static final long
**CENSIG**

<br />

Constant Value: 33639248

#### public static final int
**CENSIZ**

<br />

Constant Value: 20

#### public static final int
**CENTIM**

<br />

Constant Value: 12

#### public static final int
**CENVEM**

<br />

Constant Value: 4

#### public static final int
**CENVER**

<br />

Constant Value: 6

#### public static final int
**ENDCOM**

<br />

Constant Value: 20

#### public static final int
**ENDHDR**

<br />

Constant Value: 22

#### public static final int
**ENDOFF**

<br />

Constant Value: 16

#### public static final long
**ENDSIG**

<br />

Constant Value: 101010256

#### public static final int
**ENDSIZ**

<br />

Constant Value: 12

#### public static final int
**ENDSUB**

<br />

Constant Value: 8

#### public static final int
**ENDTOT**

<br />

Constant Value: 10

#### public static final int
**EXTCRC**

<br />

Constant Value: 4

#### public static final int
**EXTHDR**

<br />

Constant Value: 16

#### public static final int
**EXTLEN**

<br />

Constant Value: 12

#### public static final long
**EXTSIG**

<br />

Constant Value: 134695760

#### public static final int
**EXTSIZ**

<br />

Constant Value: 8

#### public static final int
**LOCCRC**

<br />

Constant Value: 14

#### public static final int
**LOCEXT**

<br />

Constant Value: 28

#### public static final int
**LOCFLG**

<br />

Constant Value: 6

#### public static final int
**LOCHDR**

<br />

Constant Value: 30

#### public static final int
**LOCHOW**

<br />

Constant Value: 8

#### public static final int
**LOCLEN**

<br />

Constant Value: 22

#### public static final int
**LOCNAM**

<br />

Constant Value: 26

#### public static final long
**LOCSIG**

<br />

Constant Value: 67324752

#### public static final int
**LOCSIZ**

<br />

Constant Value: 18

#### public static final int
**LOCTIM**

<br />

Constant Value: 10

#### public static final int
**LOCVER**

<br />

Constant Value: 4

## Public Constructors

#### public
**ZipInputStream**
([InputStream](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/InputStream.html) in)

Creates a new ZIP input stream.

The UTF-8 `https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/charset/Charset.html` is used to
decode the entry names.

##### Parameters

| in | the actual input stream |
|---|---|

#### public
**ZipInputStream**
([InputStream](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/InputStream.html) in, [Charset](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/charset/Charset.html) charset)

Creates a new ZIP input stream.

##### Parameters

| in | the actual input stream |
| charset | The {@linkplain java.nio.charset.Charset charset} to be used to decode the ZIP entry name (ignored if the [language encoding bit](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/package-summary#lang_encoding) of the ZIP entry's general purpose bit flag is set). |
|---|---|

## Public Methods

#### public int
**available**
()

Returns 0 after EOF has reached for the current entry data,
otherwise always return 1.


Programs should not count on this method to return the actual number
of bytes that could be read without blocking.

##### Returns

- 1 before EOF and 0 after EOF has reached for current entry.

##### Throws

| [IOException](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/IOException.html) | if an I/O error occurs. |
|---|---|

#### public void
**close**
()

Closes this input stream and releases any system resources associated
with the stream.

##### Throws

| [IOException](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/IOException.html) | if an I/O error has occurred |
|---|---|

#### public void
**closeEntry**
()

Closes the current ZIP entry and positions the stream for reading the
next entry.

##### Throws

| [ZipException](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipException.html) | if a ZIP file error has occurred |
| [IOException](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/IOException.html) | if an I/O error has occurred |
|---|---|

#### public [ZipEntry](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html)
**getNextEntry**
()

Reads the next ZIP file entry and positions the stream at the
beginning of the entry data.

##### Returns

- the next ZIP file entry, or null if there are no more entries

##### Throws

| [ZipException](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipException.html) | if a ZIP file error has occurred |
| [IOException](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/IOException.html) | if an I/O error has occurred |
|---|---|

#### public int
**read**
(byte\[\] b, int off, int len)

Reads from the current ZIP entry into an array of bytes.
If `len` is not zero, the method
blocks until some input is available; otherwise, no
bytes are read and `0` is returned.

##### Parameters

| b | the buffer into which the data is read |
| off | the start offset in the destination array `b` |
| len | the maximum number of bytes read |
|---|---|

##### Returns

- the actual number of bytes read, or -1 if the end of the entry is reached

##### Throws

| [NullPointerException](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/NullPointerException.html) | if `b` is `null`. |
| [IndexOutOfBoundsException](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/IndexOutOfBoundsException.html) | if `off` is negative, `len` is negative, or `len` is greater than `b.length - off` |
| [ZipException](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipException.html) | if a ZIP file error has occurred |
| [IOException](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/IOException.html) | if an I/O error has occurred |
|---|---|

#### public long
**skip**
(long n)

Skips specified number of bytes in the current ZIP entry.

##### Parameters

| n | the number of bytes to skip |
|---|---|

##### Returns

- the actual number of bytes skipped

##### Throws

| [ZipException](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipException.html) | if a ZIP file error has occurred |
| [IOException](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/IOException.html) | if an I/O error has occurred |
| [IllegalArgumentException](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/IllegalArgumentException.html) | if `n < 0` |
|---|---|

## Protected Methods

#### protected [ZipEntry](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html)
**createZipEntry**
([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name)

Creates a new `ZipEntry` object for the specified
entry name.

##### Parameters

| name | the ZIP file entry name |
|---|---|

##### Returns

- the ZipEntry just created