Class MultiReadableArchive
- java.lang.Object
-
- com.sun.enterprise.deploy.shared.AbstractReadableArchive
-
- com.sun.enterprise.deployment.deploy.shared.MultiReadableArchive
-
- All Implemented Interfaces:
org.glassfish.api.deployment.archive.Archive,org.glassfish.api.deployment.archive.ReadableArchive
@Service @PerLookup public class MultiReadableArchive extends AbstractReadableArchive
Implements ReadableArchive based on multiple underlying ReadableArchives, each of which will be processed in order when looking up entries, finding the manifest, etc.- Author:
- tjquinn
-
-
Field Summary
-
Fields inherited from class com.sun.enterprise.deploy.shared.AbstractReadableArchive
archiveMetaData, extraData
-
-
Constructor Summary
Constructors Constructor Description MultiReadableArchive()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleandelete()Enumeration<String>entries()Enumeration<String>entries(String prefix)booleanexists()booleanexists(String name)longgetArchiveSize()Collection<String>getDirectories()InputStreamgetEntry(String name)longgetEntrySize(String name)ManifestgetManifest()StringgetName()org.glassfish.api.deployment.archive.ReadableArchivegetParentArchive()get the parent archive of this archiveorg.glassfish.api.deployment.archive.ReadableArchivegetSubArchive(String name)URIgetURI()URIgetURI(int slot)booleanisDirectory(String name)voidopen(URI uri)voidopen(URI... uris)booleanrenameTo(String name)voidsetParentArchive(org.glassfish.api.deployment.archive.ReadableArchive parentArchive)set the parent archive for this archive-
Methods inherited from class com.sun.enterprise.deploy.shared.AbstractReadableArchive
addArchiveMetaData, getArchiveMetaData, getExtraData, removeArchiveMetaData, removeExtraData, setExtraData
-
-
-
-
Method Detail
-
getEntry
public InputStream getEntry(String name) throws IOException
- Throws:
IOException
-
exists
public boolean exists(String name) throws IOException
- Throws:
IOException
-
getEntrySize
public long getEntrySize(String name)
-
open
public void open(URI uri) throws IOException
- Throws:
IOException
-
open
public void open(URI... uris) throws IOException
- Throws:
IOException
-
getSubArchive
public org.glassfish.api.deployment.archive.ReadableArchive getSubArchive(String name) throws IOException
- Throws:
IOException
-
exists
public boolean exists()
-
delete
public boolean delete()
-
renameTo
public boolean renameTo(String name)
-
setParentArchive
public void setParentArchive(org.glassfish.api.deployment.archive.ReadableArchive parentArchive)
Description copied from class:AbstractReadableArchiveset the parent archive for this archive- Specified by:
setParentArchivein interfaceorg.glassfish.api.deployment.archive.ReadableArchive- Overrides:
setParentArchivein classAbstractReadableArchive- Parameters:
parentArchive- the parent archive
-
getParentArchive
public org.glassfish.api.deployment.archive.ReadableArchive getParentArchive()
Description copied from class:AbstractReadableArchiveget the parent archive of this archive- Specified by:
getParentArchivein interfaceorg.glassfish.api.deployment.archive.ReadableArchive- Overrides:
getParentArchivein classAbstractReadableArchive- Returns:
- the parent archive
-
close
public void close() throws IOException- Throws:
IOException
-
entries
public Enumeration<String> entries()
-
entries
public Enumeration<String> entries(String prefix)
-
getDirectories
public Collection<String> getDirectories() throws IOException
- Throws:
IOException
-
isDirectory
public boolean isDirectory(String name)
-
getManifest
public Manifest getManifest() throws IOException
- Throws:
IOException
-
getURI
public URI getURI()
-
getURI
public URI getURI(int slot)
-
getArchiveSize
public long getArchiveSize() throws SecurityException- Throws:
SecurityException
-
getName
public String getName()
-
-