public class JarFileArchive extends ArchiveBase implements Archive
Archive when container returns a
file: url that refers to a jar file. e.g. file:/tmp/a_ear/lib/pu.jardescriptorLocation, rootURL| Constructor and Description |
|---|
JarFileArchive(java.net.URL rootUrl,
java.util.jar.JarFile jarFile,
java.lang.String descriptorLocation) |
JarFileArchive(java.net.URL rootUrl,
java.util.jar.JarFile jarFile,
java.lang.String descriptorLocation,
java.util.logging.Logger logger) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this archive and associated InputStream.
|
java.util.Iterator<java.lang.String> |
getEntries()
Returns an
Iterator of the file entries. |
java.io.InputStream |
getEntry(java.lang.String entryPath)
Returns the InputStream for the given entry name.
|
java.net.URL |
getEntryAsURL(java.lang.String entryPath)
Returns the URL for the given entry name.
|
getDescriptorLocation, getDescriptorStream, getRootURL, setDescriptorLocation, setRootURL, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDescriptorStream, getRootURLpublic JarFileArchive(java.net.URL rootUrl,
java.util.jar.JarFile jarFile,
java.lang.String descriptorLocation)
throws java.net.MalformedURLException
java.net.MalformedURLExceptionpublic JarFileArchive(java.net.URL rootUrl,
java.util.jar.JarFile jarFile,
java.lang.String descriptorLocation,
java.util.logging.Logger logger)
throws java.net.MalformedURLException
java.net.MalformedURLExceptionpublic java.util.Iterator<java.lang.String> getEntries()
ArchiveIterator of the file entries. Each String represents
a file name relative to the root of the module.getEntries in interface Archivepublic java.io.InputStream getEntry(java.lang.String entryPath)
throws java.io.IOException
ArchivegetEntry in interface ArchivegetEntry in class ArchiveBaseentryPath - the file name relative to the root of the module.java.io.IOExceptionpublic java.net.URL getEntryAsURL(java.lang.String entryPath)
throws java.io.IOException
ArchivegetEntryAsURL in interface ArchiveentryPath - the file name relative to the root of the module.java.io.IOException