JarEntry (Java 2 Platform SE 5.0) (original) (raw)
java.util.jar
Class JarEntry
java.lang.Object
java.util.zip.ZipEntry
java.util.jar.JarEntry
All Implemented Interfaces:
public class JarEntry
extends ZipEntry
This class is used to represent a JAR file entry.
Field Summary | |
---|---|
static int | CENATT |
static int | CENATX |
static int | CENCOM |
static int | CENCRC |
static int | CENDSK |
static int | CENEXT |
static int | CENFLG |
static int | CENHDR |
static int | CENHOW |
static int | CENLEN |
static int | CENNAM |
static int | CENOFF |
static long | CENSIG |
static int | CENSIZ |
static int | CENTIM |
static int | CENVEM |
static int | CENVER |
static int | ENDCOM |
static int | ENDHDR |
static int | ENDOFF |
static long | ENDSIG |
static int | ENDSIZ |
static int | ENDSUB |
static int | ENDTOT |
static int | EXTCRC |
static int | EXTHDR |
static int | EXTLEN |
static long | EXTSIG |
static int | EXTSIZ |
static int | LOCCRC |
static int | LOCEXT |
static int | LOCFLG |
static int | LOCHDR |
static int | LOCHOW |
static int | LOCLEN |
static int | LOCNAM |
static long | LOCSIG |
static int | LOCSIZ |
static int | LOCTIM |
static int | LOCVER |
Fields inherited from class java.util.zip.ZipEntry |
---|
DEFLATED, STORED |
Constructor Summary |
---|
JarEntry(JarEntry je) Creates a new JarEntry with fields taken from the specified JarEntry object. |
JarEntry(String name) Creates a new JarEntry for the specified JAR file entry name. |
JarEntry(ZipEntry ze) Creates a new JarEntry with fields taken from the specified ZipEntry object. |
Method Summary | |
---|---|
Attributes | getAttributes() Returns the Manifest Attributes for this entry, or null if none. |
Certificate[] | getCertificates() Returns the Certificate objects for this entry, ornull if none. |
CodeSigner[] | getCodeSigners() Returns the CodeSigner objects for this entry, ornull if none. |
Methods inherited from class java.util.zip.ZipEntry |
---|
clone, getComment, getCompressedSize, getCrc, getExtra, getMethod, getName, getSize, getTime, hashCode, isDirectory, setComment, setCompressedSize, setCrc, setExtra, setMethod, setSize, setTime, toString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, notify, notifyAll, wait, wait, [wait](../../../java/lang/Object.html#wait%28long, int%29) |
Field Detail |
---|
LOCSIG
public static final long LOCSIG
See Also:
EXTSIG
public static final long EXTSIG
See Also:
CENSIG
public static final long CENSIG
See Also:
ENDSIG
public static final long ENDSIG
See Also:
LOCHDR
public static final int LOCHDR
See Also:
EXTHDR
public static final int EXTHDR
See Also:
CENHDR
public static final int CENHDR
See Also:
ENDHDR
public static final int ENDHDR
See Also:
LOCVER
public static final int LOCVER
See Also:
LOCFLG
public static final int LOCFLG
See Also:
LOCHOW
public static final int LOCHOW
See Also:
LOCTIM
public static final int LOCTIM
See Also:
LOCCRC
public static final int LOCCRC
See Also:
LOCSIZ
public static final int LOCSIZ
See Also:
LOCLEN
public static final int LOCLEN
See Also:
LOCNAM
public static final int LOCNAM
See Also:
LOCEXT
public static final int LOCEXT
See Also:
EXTCRC
public static final int EXTCRC
See Also:
EXTSIZ
public static final int EXTSIZ
See Also:
EXTLEN
public static final int EXTLEN
See Also:
CENVEM
public static final int CENVEM
See Also:
CENVER
public static final int CENVER
See Also:
CENFLG
public static final int CENFLG
See Also:
CENHOW
public static final int CENHOW
See Also:
CENTIM
public static final int CENTIM
See Also:
CENCRC
public static final int CENCRC
See Also:
CENSIZ
public static final int CENSIZ
See Also:
CENLEN
public static final int CENLEN
See Also:
CENNAM
public static final int CENNAM
See Also:
CENEXT
public static final int CENEXT
See Also:
CENCOM
public static final int CENCOM
See Also:
CENDSK
public static final int CENDSK
See Also:
CENATT
public static final int CENATT
See Also:
CENATX
public static final int CENATX
See Also:
CENOFF
public static final int CENOFF
See Also:
ENDSUB
public static final int ENDSUB
See Also:
ENDTOT
public static final int ENDTOT
See Also:
ENDSIZ
public static final int ENDSIZ
See Also:
ENDOFF
public static final int ENDOFF
See Also:
ENDCOM
public static final int ENDCOM
See Also:
Constructor Detail |
---|
JarEntry
public JarEntry(String name)
Creates a new JarEntry
for the specified JAR file entry name.
Parameters:
name
- the JAR file entry name
Throws:
[NullPointerException](../../../java/lang/NullPointerException.html "class in java.lang")
- if the entry name is null
[IllegalArgumentException](../../../java/lang/IllegalArgumentException.html "class in java.lang")
- if the entry name is longer than 0xFFFF bytes.
JarEntry
public JarEntry(ZipEntry ze)
Creates a new JarEntry
with fields taken from the specified ZipEntry
object.
Parameters:
ze
- the ZipEntry
object to create the JarEntry
from
JarEntry
public JarEntry(JarEntry je)
Creates a new JarEntry
with fields taken from the specified JarEntry
object.
Parameters:
je
- the JarEntry
to copy
Method Detail |
---|
getAttributes
public Attributes getAttributes() throws IOException
Returns the Manifest
Attributes
for this entry, or null
if none.
Returns:
the Manifest
Attributes
for this entry, or null
if none
Throws:
[IOException](../../../java/io/IOException.html "class in java.io")
getCertificates
public Certificate[] getCertificates()
Returns the Certificate
objects for this entry, ornull
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, ornull
if none.
getCodeSigners
public CodeSigner[] getCodeSigners()
Returns the CodeSigner
objects for this entry, ornull
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, ornull
if none.
Since:
1.5
Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2004, 2010 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.