java.util.jar.JarEntry Maven / Gradle / Ivy
/*
This is not an official specification document, and usage is restricted.
NOTICE
(c) 2005-2007 Sun Microsystems, Inc. All Rights Reserved.
Neither this file nor any files generated from it describe a complete
specification, and they may only be used as described below. For
example, no permission is given for you to incorporate this file, in
whole or in part, in an implementation of a Java specification.
Sun Microsystems Inc. owns the copyright in this file and it is provided
to you for informative, as opposed to normative, use. The file and any
files generated from it may be used to generate other informative
documentation, such as a unified set of documents of API signatures for
a platform that includes technologies expressed as Java APIs. The file
may also be used to produce "compilation stubs," which allow
applications to be compiled and validated for such platforms.
Any work generated from this file, such as unified javadocs or compiled
stub files, must be accompanied by this notice in its entirety.
This work corresponds to the API signatures of JSR 219: Foundation
Profile 1.1. In the event of a discrepency between this work and the
JSR 219 specification, which is available at
http://www.jcp.org/en/jsr/detail?id=219, the latter takes precedence.
*/
package java.util.jar;
import java.io.IOException;
import java.util.zip.ZipEntry;
import java.security.cert.Certificate;
/**
* This class is used to represent a JAR file entry.
*/
public class JarEntry extends ZipEntry
{
/**
* Creates a new JarEntry
for the specified JAR file
* entry name.
*
* @param name the JAR file entry name
* @exception NullPointerException if the entry name is null
* @exception IllegalArgumentException if the entry name is longer than
* 0xFFFF bytes.
*/
public JarEntry(String name) {
super(name);
}
/**
* Creates a new JarEntry
with fields taken from the
* specified ZipEntry
object.
* @param ze the ZipEntry
object to create the
* JarEntry
from
*/
public JarEntry(ZipEntry ze) {
super(ze);
}
/**
* Creates a new JarEntry
with fields taken from the
* specified JarEntry
object.
*
* @param je the JarEntry
to copy
*/
public JarEntry(JarEntry je) {
this((ZipEntry)je);
}
/**
* Returns the Manifest
Attributes
for this
* entry, or null
if none.
*
* @return the Manifest
Attributes
for this
* entry, or null
if none
*/
public Attributes getAttributes() throws IOException {
return null;
}
/**
* Returns the Certificate
objects for this entry, or
* null
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).
*
* @return the Certificate
objects for this entry, or
* null
if none.
*/
public Certificate[] getCertificates() {
return null;
}
}