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(URL rootUrl,
JarFile jarFile,
String descriptorLocation) |
JarFileArchive(URL rootUrl,
JarFile jarFile,
String descriptorLocation,
Logger logger) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this archive and associated InputStream.
|
Iterator<String> |
getEntries()
Returns an
Iterator of the file entries. |
InputStream |
getEntry(String entryPath)
Returns the InputStream for the given entry name.
|
URL |
getEntryAsURL(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(URL rootUrl, JarFile jarFile, String descriptorLocation) throws MalformedURLException
MalformedURLExceptionpublic JarFileArchive(URL rootUrl, JarFile jarFile, String descriptorLocation, Logger logger) throws MalformedURLException
MalformedURLExceptionpublic Iterator<String> getEntries()
ArchiveIterator of the file entries. Each String represents
a file name relative to the root of the module.getEntries in interface Archivepublic InputStream getEntry(String entryPath) throws IOException
ArchivegetEntry in interface ArchivegetEntry in class ArchiveBaseentryPath - the file name relative to the root of the module.IOExceptionpublic URL getEntryAsURL(String entryPath) throws IOException
ArchivegetEntryAsURL in interface ArchiveentryPath - the file name relative to the root of the module.IOExceptionCopyright © 2007–2021 Eclipse.org - EclipseLink Project. All rights reserved.