public class OSGiBundleArchive extends com.sun.enterprise.deploy.shared.AbstractReadableArchive implements URIable, Iterable<BundleResource>
Bundle to Archive.
It uses JAR File space of the bundle (via getEntry and getEntryPaths APIs),
so a bundle does not have to be in resolved state.
Since it represents JAR File space of the bundle, it does not
consider resources from any fragments.| Constructor and Description |
|---|
OSGiBundleArchive(org.osgi.framework.Bundle b) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
delete() |
Enumeration<String> |
entries() |
Enumeration<String> |
entries(String prefix) |
boolean |
exists() |
boolean |
exists(String name) |
long |
getArchiveSize() |
Collection<String> |
getDirectories()
Returns the enumeration of first level directories in this
archive
|
String |
getDistanceFromTop()
When this archive is embedded in another archive, this method returns the distance from top.
|
InputStream |
getEntry(String name) |
long |
getEntrySize(String name) |
URI |
getEntryURI(String name) |
InputStream |
getInputStream() |
Manifest |
getManifest() |
String |
getName() |
org.glassfish.api.deployment.archive.ReadableArchive |
getParentArchive() |
org.glassfish.api.deployment.archive.ReadableArchive |
getSubArchive(String name) |
URI |
getURI()
It returns URI for the underlying file if it can locate such a file.
|
boolean |
isDirectory(String name) |
Iterator<BundleResource> |
iterator() |
void |
open(URI uri) |
boolean |
renameTo(String name) |
void |
setParentArchive(org.glassfish.api.deployment.archive.ReadableArchive parentArchive) |
public void close()
throws IOException
close in interface org.glassfish.api.deployment.archive.ArchiveIOExceptionpublic Enumeration<String> entries()
entries in interface org.glassfish.api.deployment.archive.Archivepublic Collection<String> getDirectories() throws IOException
getDirectories in interface org.glassfish.api.deployment.archive.ArchiveIOExceptionpublic Enumeration<String> entries(String prefix)
entries in interface org.glassfish.api.deployment.archive.Archivepublic boolean isDirectory(String name)
isDirectory in interface org.glassfish.api.deployment.archive.Archivepublic Manifest getManifest() throws IOException
getManifest in interface org.glassfish.api.deployment.archive.ArchiveIOExceptionpublic URI getURI()
getURI in interface org.glassfish.api.deployment.archive.Archivepublic long getArchiveSize()
throws SecurityException
getArchiveSize in interface org.glassfish.api.deployment.archive.ArchiveSecurityExceptionpublic String getName()
getName in interface org.glassfish.api.deployment.archive.Archivepublic InputStream getEntry(String name) throws IOException
getEntry in interface org.glassfish.api.deployment.archive.ReadableArchiveIOExceptionpublic boolean exists(String name)
exists in interface org.glassfish.api.deployment.archive.ReadableArchivepublic long getEntrySize(String name)
getEntrySize in interface org.glassfish.api.deployment.archive.ReadableArchivepublic void open(URI uri) throws IOException
open in interface org.glassfish.api.deployment.archive.ReadableArchiveIOExceptionpublic org.glassfish.api.deployment.archive.ReadableArchive getSubArchive(String name) throws IOException
getSubArchive in interface org.glassfish.api.deployment.archive.ReadableArchiveIOExceptionpublic boolean exists()
exists in interface org.glassfish.api.deployment.archive.ReadableArchivepublic boolean delete()
delete in interface org.glassfish.api.deployment.archive.ReadableArchivepublic boolean renameTo(String name)
renameTo in interface org.glassfish.api.deployment.archive.ReadableArchivepublic void setParentArchive(org.glassfish.api.deployment.archive.ReadableArchive parentArchive)
setParentArchive in interface org.glassfish.api.deployment.archive.ReadableArchivesetParentArchive in class com.sun.enterprise.deploy.shared.AbstractReadableArchivepublic org.glassfish.api.deployment.archive.ReadableArchive getParentArchive()
getParentArchive in interface org.glassfish.api.deployment.archive.ReadableArchivegetParentArchive in class com.sun.enterprise.deploy.shared.AbstractReadableArchivepublic URI getEntryURI(String name)
getEntryURI in interface URIablename - the entry name relative to the root of the archivepublic String getDistanceFromTop()
URIablegetDistanceFromTop in interface URIablepublic Iterator<BundleResource> iterator()
iterator in interface Iterable<BundleResource>public InputStream getInputStream() throws IOException
IOExceptionCopyright © 2017–2019 Eclipse Foundation. All rights reserved.