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.jarConstructor 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, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDescriptorStream, getRootURL
public JarFileArchive(URL rootUrl, JarFile jarFile, String descriptorLocation) throws MalformedURLException
MalformedURLException
public JarFileArchive(URL rootUrl, JarFile jarFile, String descriptorLocation, Logger logger) throws MalformedURLException
MalformedURLException
public Iterator<String> getEntries()
Archive
Iterator
of the file entries. Each String represents
a file name relative to the root of the module.getEntries
in interface Archive
public InputStream getEntry(String entryPath) throws IOException
Archive
getEntry
in interface Archive
getEntry
in class ArchiveBase
entryPath
- the file name relative to the root of the module.IOException
public URL getEntryAsURL(String entryPath) throws IOException
Archive
getEntryAsURL
in interface Archive
entryPath
- the file name relative to the root of the module.IOException
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference