public class OSGiBundleArchive extends com.sun.enterprise.deploy.shared.AbstractReadableArchive implements URIable, java.lang.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() |
java.util.Enumeration<java.lang.String> |
entries() |
java.util.Enumeration<java.lang.String> |
entries(java.lang.String prefix) |
boolean |
exists() |
boolean |
exists(java.lang.String name) |
long |
getArchiveSize() |
java.util.Collection<java.lang.String> |
getDirectories()
Returns the enumeration of first level directories in this
archive
|
java.lang.String |
getDistanceFromTop()
When this archive is embedded in another archive, this method returns the distance from top.
|
java.io.InputStream |
getEntry(java.lang.String name) |
long |
getEntrySize(java.lang.String name) |
java.net.URI |
getEntryURI(java.lang.String name) |
java.io.InputStream |
getInputStream() |
java.util.jar.Manifest |
getManifest() |
java.lang.String |
getName() |
org.glassfish.api.deployment.archive.ReadableArchive |
getParentArchive() |
org.glassfish.api.deployment.archive.ReadableArchive |
getSubArchive(java.lang.String name) |
java.net.URI |
getURI()
It returns URI for the underlying file if it can locate such a file.
|
boolean |
isDirectory(java.lang.String name) |
java.util.Iterator<BundleResource> |
iterator() |
void |
open(java.net.URI uri) |
boolean |
renameTo(java.lang.String name) |
void |
setParentArchive(org.glassfish.api.deployment.archive.ReadableArchive parentArchive) |
public void close()
throws java.io.IOException
close in interface org.glassfish.api.deployment.archive.Archivejava.io.IOExceptionpublic java.util.Enumeration<java.lang.String> entries()
entries in interface org.glassfish.api.deployment.archive.Archivepublic java.util.Collection<java.lang.String> getDirectories()
throws java.io.IOException
getDirectories in interface org.glassfish.api.deployment.archive.Archivejava.io.IOExceptionpublic java.util.Enumeration<java.lang.String> entries(java.lang.String prefix)
entries in interface org.glassfish.api.deployment.archive.Archivepublic boolean isDirectory(java.lang.String name)
isDirectory in interface org.glassfish.api.deployment.archive.Archivepublic java.util.jar.Manifest getManifest()
throws java.io.IOException
getManifest in interface org.glassfish.api.deployment.archive.Archivejava.io.IOExceptionpublic java.net.URI getURI()
getURI in interface org.glassfish.api.deployment.archive.Archivepublic long getArchiveSize()
throws java.lang.SecurityException
getArchiveSize in interface org.glassfish.api.deployment.archive.Archivejava.lang.SecurityExceptionpublic java.lang.String getName()
getName in interface org.glassfish.api.deployment.archive.Archivepublic java.io.InputStream getEntry(java.lang.String name)
throws java.io.IOException
getEntry in interface org.glassfish.api.deployment.archive.ReadableArchivejava.io.IOExceptionpublic boolean exists(java.lang.String name)
exists in interface org.glassfish.api.deployment.archive.ReadableArchivepublic long getEntrySize(java.lang.String name)
getEntrySize in interface org.glassfish.api.deployment.archive.ReadableArchivepublic void open(java.net.URI uri)
throws java.io.IOException
open in interface org.glassfish.api.deployment.archive.ReadableArchivejava.io.IOExceptionpublic org.glassfish.api.deployment.archive.ReadableArchive getSubArchive(java.lang.String name)
throws java.io.IOException
getSubArchive in interface org.glassfish.api.deployment.archive.ReadableArchivejava.io.IOExceptionpublic boolean exists()
exists in interface org.glassfish.api.deployment.archive.ReadableArchivepublic boolean delete()
delete in interface org.glassfish.api.deployment.archive.ReadableArchivepublic boolean renameTo(java.lang.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 java.net.URI getEntryURI(java.lang.String name)
getEntryURI in interface URIablename - the entry name relative to the root of the archivepublic java.lang.String getDistanceFromTop()
URIablegetDistanceFromTop in interface URIablepublic java.util.Iterator<BundleResource> iterator()
iterator in interface java.lang.Iterable<BundleResource>public java.io.InputStream getInputStream()
throws java.io.IOException
java.io.IOExceptionCopyright © 2018 GlassFish Community. All Rights Reserved.