public class

JarEntry

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

Class Overview

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

Summary

[Expand]
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.
[Expand]
Inherited Methods
From class java.util.zip.ZipEntry
From class java.lang.Object

Public Constructors

public JarEntry (String name)

Since: API Level 1

Creates a new JarEntry named name.

Parameters
name The name of the new JarEntry.

public JarEntry (ZipEntry entry)

Since: API Level 1

Creates a new JarEntry using the values obtained from entry.

Parameters
entry The ZipEntry to obtain values from.

public JarEntry (JarEntry je)

Since: API Level 1

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

Parameters
je The JarEntry to obtain values from.

Public Methods

public Attributes getAttributes ()

Since: API Level 1

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

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

public Certificate[] getCertificates ()

Since: API Level 1

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.

Returns
  • the certificate for this entry.
See Also

public CodeSigner[] getCodeSigners ()

Since: API Level 1

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.

Returns
  • the code signers for the JAR entry.
See Also