# JarEntry

public class **JarEntry** extends [ZipEntry](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html)  
This class is used to represent a JAR file entry.

### Inherited Constant Summary

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

|---|---|---|
| int | [CENATT](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#CENATT) |   |
| int | [CENATX](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#CENATX) |   |
| int | [CENCOM](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#CENCOM) |   |
| int | [CENCRC](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#CENCRC) |   |
| int | [CENDSK](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#CENDSK) |   |
| int | [CENEXT](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#CENEXT) |   |
| int | [CENFLG](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#CENFLG) |   |
| int | [CENHDR](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#CENHDR) |   |
| int | [CENHOW](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#CENHOW) |   |
| int | [CENLEN](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#CENLEN) |   |
| int | [CENNAM](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#CENNAM) |   |
| int | [CENOFF](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#CENOFF) |   |
| long | [CENSIG](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#CENSIG) |   |
| int | [CENSIZ](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#CENSIZ) |   |
| int | [CENTIM](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#CENTIM) |   |
| int | [CENVEM](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#CENVEM) |   |
| int | [CENVER](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#CENVER) |   |
| int | [DEFLATED](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#DEFLATED) | Compression method for compressed (deflated) entries. |
| long | [DOSTIME_BEFORE_1980](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#DOSTIME_BEFORE_1980) | DOS time constant for representing timestamps before 1980. |
| int | [ENDCOM](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#ENDCOM) |   |
| int | [ENDHDR](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#ENDHDR) |   |
| int | [ENDOFF](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#ENDOFF) |   |
| long | [ENDSIG](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#ENDSIG) |   |
| int | [ENDSIZ](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#ENDSIZ) |   |
| int | [ENDSUB](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#ENDSUB) |   |
| int | [ENDTOT](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#ENDTOT) |   |
| int | [EXTCRC](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#EXTCRC) |   |
| int | [EXTHDR](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#EXTHDR) |   |
| int | [EXTLEN](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#EXTLEN) |   |
| long | [EXTSIG](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#EXTSIG) |   |
| int | [EXTSIZ](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#EXTSIZ) |   |
| int | [LOCCRC](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#LOCCRC) |   |
| int | [LOCEXT](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#LOCEXT) |   |
| int | [LOCFLG](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#LOCFLG) |   |
| int | [LOCHDR](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#LOCHDR) |   |
| int | [LOCHOW](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#LOCHOW) |   |
| int | [LOCLEN](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#LOCLEN) |   |
| int | [LOCNAM](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#LOCNAM) |   |
| long | [LOCSIG](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#LOCSIG) |   |
| int | [LOCSIZ](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#LOCSIZ) |   |
| int | [LOCTIM](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#LOCTIM) |   |
| int | [LOCVER](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#LOCVER) |   |
| int | [STORED](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#STORED) | Compression method for uncompressed entries. |

### Public Constructor Summary

|---|---|
|   | [JarEntry](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/jar/JarEntry.html#JarEntry(java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name) Creates a new `JarEntry` for the specified JAR file entry name. |
|   | [JarEntry](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/jar/JarEntry.html#JarEntry(java.util.zip.ZipEntry))([ZipEntry](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html) ze) Creates a new `JarEntry` with fields taken from the specified `ZipEntry` object. |
|   | [JarEntry](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/jar/JarEntry.html#JarEntry(java.util.jar.JarEntry))([JarEntry](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/jar/JarEntry.html) je) Creates a new `JarEntry` with fields taken from the specified `JarEntry` object. |

### Public Method Summary

|---|---|
| [Attributes](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/jar/Attributes.html) | [getAttributes](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/jar/JarEntry.html#getAttributes())() Returns the `Manifest` `Attributes` for this entry, or `null` if none. |
| [Certificate\[\]](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/Certificate.html) | [getCertificates](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/jar/JarEntry.html#getCertificates())() Returns the `Certificate` objects for this entry, or `null` if none. |
| [CodeSigner\[\]](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/CodeSigner.html) | [getCodeSigners](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/jar/JarEntry.html#getCodeSigners())() Returns the `CodeSigner` objects for this entry, or `null` if none. |

### Inherited Method Summary

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

|---|---|
| [Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) | [clone](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#clone())() Returns a copy of this entry. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [getComment](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#getComment())() Returns the comment string for the entry. |
| long | [getCompressedSize](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#getCompressedSize())() Returns the size of the compressed entry data. |
| long | [getCrc](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#getCrc())() Returns the CRC-32 checksum of the uncompressed entry data. |
| FileTime | [getCreationTime](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#getCreationTime())() Returns the creation time of the entry. |
| byte\[\] | [getExtra](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#getExtra())() Returns the extra field data for the entry. |
| FileTime | [getLastAccessTime](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#getLastAccessTime())() Returns the last access time of the entry. |
| FileTime | [getLastModifiedTime](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#getLastModifiedTime())() Returns the last modification time of the entry. |
| int | [getMethod](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#getMethod())() Returns the compression method of the entry. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [getName](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#getName())() Returns the name of the entry. |
| long | [getSize](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#getSize())() Returns the uncompressed size of the entry data. |
| long | [getTime](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#getTime())() Returns the last modification time of the entry. |
| int | [hashCode](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#hashCode())() Returns the hash code value for this entry. |
| boolean | [isDirectory](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#isDirectory())() Returns true if this is a directory entry. |
| void | [setComment](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#setComment(java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) comment) Sets the optional comment string for the entry. |
| void | [setCompressedSize](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#setCompressedSize(long))(long csize) Sets the size of the compressed entry data. |
| void | [setCrc](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#setCrc(long))(long crc) Sets the CRC-32 checksum of the uncompressed entry data. |
| [ZipEntry](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html) | [setCreationTime](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#setCreationTime(java.nio.file.attribute.FileTime))(FileTime time) Sets the creation time of the entry. |
| void | [setExtra](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#setExtra(byte[]))(byte\[\] extra) Sets the optional extra field data for the entry. |
| [ZipEntry](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html) | [setLastAccessTime](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#setLastAccessTime(java.nio.file.attribute.FileTime))(FileTime time) Sets the last access time of the entry. |
| [ZipEntry](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html) | [setLastModifiedTime](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#setLastModifiedTime(java.nio.file.attribute.FileTime))(FileTime time) Sets the last modification time of the entry. |
| void | [setMethod](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#setMethod(int))(int method) Sets the compression method for the entry. |
| void | [setSize](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#setSize(long))(long size) Sets the uncompressed size of the entry data. |
| void | [setTime](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#setTime(long))(long time) Sets the last modification time of the entry. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [toString](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/zip/ZipEntry.html#toString())() Returns a string representation of the ZIP entry. |

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. |

## Public Constructors

#### public
**JarEntry**
([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) name)

Creates a new `JarEntry` for the specified JAR file
entry name.

##### Parameters

| name | the JAR file entry name |
|---|---|

##### Throws

| [NullPointerException](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/NullPointerException.html) | if the entry name is `null` |
| [IllegalArgumentException](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/IllegalArgumentException.html) | if the entry name is longer than 0xFFFF bytes. |
|---|---|

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

Creates a new `JarEntry` with fields taken from the
specified `ZipEntry` object.

##### Parameters

| ze | the `ZipEntry` object to create the `JarEntry` from |
|---|---|

#### public
**JarEntry**
([JarEntry](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/jar/JarEntry.html) je)

Creates a new `JarEntry` with fields taken from the
specified `JarEntry` object.

##### Parameters

| je | the `JarEntry` to copy |
|---|---|

## Public Methods

#### public [Attributes](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/jar/Attributes.html)
**getAttributes**
()

Returns the `Manifest` `Attributes` for this
entry, or `null` if none.

##### Returns

- the `Manifest` `Attributes` for this entry, or `null` if none

##### Throws

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

#### public [Certificate\[\]](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/Certificate.html)
**getCertificates**
()

Returns the `Certificate` objects for this entry, or
`null` if none. This method can only be called once
the `JarEntry` has been completely verified by reading
from the entry input stream until the end of the stream has been
reached. Otherwise, this method will return `null`.

The returned certificate array comprises all the signer certificates
that were used to verify this entry. Each signer certificate is
followed by its supporting certificate chain (which may be empty).
Each signer certificate and its supporting certificate chain are ordered
bottom-to-top (i.e., with the signer certificate first and the (root)
certificate authority last).

##### Returns

- the `Certificate` objects for this entry, or `null` if none.

#### public [CodeSigner\[\]](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/CodeSigner.html)
**getCodeSigners**
()

Returns the `CodeSigner` objects for this entry, or
`null` if none. This method can only be called once
the `JarEntry` has been completely verified by reading
from the entry input stream until the end of the stream has been
reached. Otherwise, this method will return `null`.

The returned array comprises all the code signers that have signed
this entry.

##### Returns

- the `CodeSigner` objects for this entry, or `null` if none.