java.util.jar
Class JarEntry
java.lang.Object
|
+--java.util.zip.ZipEntry
|
+--java.util.jar.JarEntry
Extension to a ZipEntry that contains manifest attributes and certificates.
Both the Atrributes and the Certificates can be null when not set.
Note that the
getCertificates()
method only returns a
valid value after all of the data of the entry has been read.
There are no public methods to set the attributes or certificate of an
Entru. Only JarEntries created by the classes in java.util.jar
will have these properties set.
Since:Author:- Mark Wielaard (mark@klomp.org)
JarEntry
public JarEntry(java.lang.String name)
Creates a new JarEntry with the specified name and no attributes or
or certificates. Calls super(name)
so all other (zip)entry
fields are null or -1.
Parameters:
Throws:
JarEntry
public JarEntry(java.util.jar.JarEntry entry)
Creates a new JarEntry with the specified JarEntry as template for
all properties of the entry.
Parameters:
JarEntry
public JarEntry(java.util.zip.ZipEntry entry)
Creates a new JarEntry with the specified ZipEntry as template for
all properties of the entry. Both attributes and certificates will be
null.
Parameters:
getAttributes
public Attributes getAttributes()
Returns a copy of the Attributes set for this entry.
When no Attributes are set in the manifest null is returned.
Returns:
- a copy of the Attributes set for this entry
Throws:
getCertificates
public Certificate[] getCertificates()
Returns a copy of the certificates set for this entry.
When no certificates are set or when not all data of this entry has
been read null is returned.
To make sure that this call returns a valid value you must read all
data from the JarInputStream for this entry.
When you don't need the data for an entry but want to know the
certificates that are set for the entry then you can skip all data by
calling skip(entry.getSize())
on the JarInputStream for
the entry.
Returns:
- a copy of the certificates set for this entry
getCertificates()
method only returns a valid value after all of the data of the entry has been read.There are no public methods to set the attributes or certificate of an Entru. Only JarEntries created by the classes in
java.util.jar
will have these properties set.