Most visited

Recently visited

Added in API level 1

JarEntry

public class JarEntry
extends ZipEntry

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


该类用于表示JAR文件条目。

Summary

Inherited constants

From class java.util.zip.ZipEntry

Public constructors

JarEntry(String name)

为指定的JAR文件条目名称创建一个新的 JarEntry 。

JarEntry(ZipEntry ze)

创建一个新的 JarEntry其中包含从指定的 ZipEntry对象获取的字段。

JarEntry(JarEntry je)

创建一个新的 JarEntry其中的字段来自指定的 JarEntry对象。

Public methods

Attributes getAttributes()

如果没有,则返回 Manifest Attributes或 null 。

Certificate[] getCertificates()

返回 Certificate对象此条,或 null如果没有。

CodeSigner[] getCodeSigners()

返回 CodeSigner对象此条,或 null如果没有。

Inherited methods

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

Public constructors

JarEntry

Added in API level 1
JarEntry (String name)

为指定的JAR文件条目名称创建一个新的 JarEntry 。

Parameters
name String: the JAR file entry name
Throws
NullPointerException if the entry name is null
IllegalArgumentException if the entry name is longer than 0xFFFF bytes.

JarEntry

Added in API level 1
JarEntry (ZipEntry ze)

创建一个新的 JarEntry其中的字段来自指定的 ZipEntry对象。

Parameters
ze ZipEntry: the ZipEntry object to create the JarEntry from

JarEntry

Added in API level 1
JarEntry (JarEntry je)

创建一个新的 JarEntry其中的字段来自指定的 JarEntry对象。

Parameters
je JarEntry: the JarEntry to copy

Public methods

getAttributes

Added in API level 1
Attributes getAttributes ()

如果没有,则返回 Manifest Attributes或 null 。

Returns
Attributes the Manifest Attributes for this entry, or null if none
Throws
IOException

getCertificates

Added in API level 1
Certificate[] getCertificates ()

返回Certificate对象此条,或null如果没有。 只有在JarEntry已通过从输入输入流中读取完成验证后才能调用此方法,直到到达流的末尾。 否则,此方法将返回null 。

返回的证书数组包含用于验证此条目的所有签署者证书。 每个签署者证书后面都有其支持证书链(可能为空)。 每个签署者证书及其支持证书链按照从下到上的顺序排列(即签署者证书第一个和(根)证书颁发机构最后)。

Returns
Certificate[] the Certificate objects for this entry, or null if none.

getCodeSigners

Added in API level 1
CodeSigner[] getCodeSigners ()

返回CodeSigner对象此条,或null如果没有。 只有当JarEntry已经通过从输入输入流中读取直到流结束已经完全验证时才能调用该方法。 否则,此方法将返回null 。

返回的数组包含所有已签名此条目的代码签名者。

Returns
CodeSigner[] the CodeSigner objects for this entry, or null if none.

Hooray!