FileDocCategorySizeDatePackage
Archive.javaAPI DocGlassfish v2 API4920Fri May 04 22:31:36 BST 2007com.sun.enterprise.deployment.deploy.shared

Archive

public interface Archive
This interface is an abstraction for accessing a module archive.
author
Jerome Dochez

Fields Summary
Constructors Summary
Methods Summary
public voidclose()
closes this archive and releases all resources

public java.util.Enumerationentries()
Returns an enumeration of the module file entries. All elements in the enumeration are of type String. Each String represents a file name relative to the root of the module.

return
an enumeration of the archive file entries.

public java.util.Enumerationentries(java.lang.String prefix)
Returns an enumeration of the module file entries with the specified prefix. All elements in the enumeration are of type String. Each String represents a file name relative to the root of the module.

param
prefix the prefix of entries to be included
return
an enumeration of the archive file entries.

public longgetArchiveSize()
Returns the size of the archive.

return
long indicating the size of the archive

public java.io.InputStreamgetEntry(java.lang.String name)
Returns the InputStream for the given entry name The file name must be relative to the root of the module.

param
name the file name relative to the root of the module.
return
the InputStream for the given entry name or null if not found.

public java.util.jar.ManifestgetManifest()
Returns the manifest information for this archive

return
the manifest info

public com.sun.enterprise.deployment.deploy.shared.ArchivegetSubArchive(java.lang.String name)
Returns an instance of this archive abstraction for an embedded archive within this archive.

param
name is the entry name relative to the root for the archive
return
the Archive instance for this abstraction

public java.net.URIgetURI()
(Optional) Returns the path for this archive. If the archive is implemented as a jar file for instance, it will return the full path to the jar file as jar url like jar://foo/bar/archive.jar

If the archive is implemented as a directory structure with each entry a separate file, it will return the root directory as a file url like file://foo/bar/archive

Some implementation of the archive which are not based on the file system will not be able to return a value.

return
the url path for this archive.