Skip to content

Most visited

Recently visited

navigation
Added in API level 1

JarEntry

public class JarEntry
extends ZipEntry

java.lang.Object
   ↳ java.util.zip.ZipEntry
     ↳ java.util.jar.JarEntry


Represents a single file in a JAR archive together with the manifest attributes and digital signatures associated with it.

See also:

Summary

Inherited constants

From class java.util.zip.ZipEntry

Public constructors

JarEntry(String name)

Creates a new JarEntry named name.

JarEntry(ZipEntry entry)

Creates a new JarEntry using the values obtained from entry.

JarEntry(JarEntry je)

Create a new JarEntry using the values obtained from the argument.

Public methods

Attributes getAttributes()

Returns the Attributes object associated with this entry or null if none exists.

Certificate[] getCertificates()

Returns an array of Certificate Objects associated with this entry or null if none exists.

CodeSigner[] getCodeSigners()

Returns the code signers for the digital signatures associated with the JAR file.

Inherited methods

From class java.util.zip.ZipEntry
From class java.lang.Object

Public constructors

JarEntry

Added in API level 1
JarEntry (String name)

Creates a new JarEntry named name.

Parameters
name String: The name of the new JarEntry.

JarEntry

Added in API level 1
JarEntry (ZipEntry entry)

Creates a new JarEntry using the values obtained from entry.

Parameters
entry ZipEntry: The ZipEntry to obtain values from.

JarEntry

Added in API level 1
JarEntry (JarEntry je)

Create a new JarEntry using the values obtained from the argument.

Parameters
je JarEntry: The JarEntry to obtain values from.

Public methods

getAttributes

Added in API level 1
Attributes getAttributes ()

Returns the Attributes object associated with this entry or null if none exists.

Returns
Attributes the Attributes for this entry.
Throws
IOException If an error occurs obtaining the Attributes.

See also:

getCertificates

Added in API level 1
Certificate[] getCertificates ()

Returns an array of Certificate Objects associated with this entry or null if none exists. Make sure that the everything is read from the input stream before calling this method, or else the method returns null.

This method returns all the signers' unverified chains concatenated together in one array. To know which certificates were tied to the private keys that made the signatures on this entry, see getCodeSigners() instead.

Returns
Certificate[]

See also:

getCodeSigners

Added in API level 1
CodeSigner[] getCodeSigners ()

Returns the code signers for the digital signatures associated with the JAR file. If there is no such code signer, it returns null. Make sure that the everything is read from the input stream before calling this method, or else the method returns null.

Only the digital signature on the entry is cryptographically verified. None of the certificates in the the CertPath returned from getSignerCertPath() are verified and must be verified by the caller if needed. See CertPathValidator for more information.

Returns
CodeSigner[] an array of CodeSigner for this JAR entry.

See also:

This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.