|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Archive
This interface is an abstraction for accessing a module archive.
| Method Summary | |
|---|---|
void |
close()
closes this archive and releases all resources |
java.util.Enumeration<java.lang.String> |
entries()
Returns an enumeration of the module file entries. |
java.util.Enumeration<java.lang.String> |
entries(java.lang.String prefix)
Returns an enumeration of the module file entries with the specified prefix. |
long |
getArchiveSize()
Returns the size of the archive. |
java.util.Collection<java.lang.String> |
getDirectories()
Returns the enumeration of first level directories in this archive |
java.util.jar.Manifest |
getManifest()
Returns the manifest information for this archive |
java.lang.String |
getName()
Returns the name of the archive. |
java.net.URI |
getURI()
Returns the path used to create or open the underlying archive |
boolean |
isDirectory(java.lang.String name)
Returns true if the entry is a directory or a plain file |
| Method Detail |
|---|
void close()
throws java.io.IOException
java.io.IOExceptionjava.util.Enumeration<java.lang.String> entries()
java.util.Enumeration<java.lang.String> entries(java.lang.String prefix)
prefix - the prefix of entries to be included
java.util.Collection<java.lang.String> getDirectories()
throws java.io.IOException
java.io.IOExceptionboolean isDirectory(java.lang.String name)
name - name is one of the entries returned by entries()
java.util.jar.Manifest getManifest()
throws java.io.IOException
java.io.IOExceptionjava.net.URI getURI()
TODO: abstraction breakage:
Several callers, most notably DeploymentContext.getSourceDir()
implementation, assumes that this URI is an URL, and in fact file URL.
If this needs to be URL, use of URI is misleading. And furthermore,
if its needs to be a file URL, this should be File.
long getArchiveSize()
throws java.lang.SecurityException
java.lang.SecurityExceptionjava.lang.String getName()
Implementations should not return null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||