Module org.eclipse.persistence.jpa
Class JarFileArchive
java.lang.Object
org.eclipse.persistence.internal.jpa.deployment.ArchiveBase
org.eclipse.persistence.internal.jpa.deployment.JarFileArchive
- All Implemented Interfaces:
Archive
This is an implementation of
Archive when container returns a
file: url that refers to a jar file. e.g. file:/tmp/a_ear/lib/pu.jar-
Field Summary
Fields inherited from class org.eclipse.persistence.internal.jpa.deployment.ArchiveBase
descriptorLocation, rootURL -
Constructor Summary
ConstructorsConstructorDescriptionJarFileArchive(URL rootUrl, JarFile jarFile, String descriptorLocation) JarFileArchive(URL rootUrl, JarFile jarFile, String descriptorLocation, Logger logger) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close this archive and associated InputStream.Returns anIteratorof the file entries.Returns the InputStream for the given entry name.getEntryAsURL(String entryPath) Returns the URL for the given entry name.Methods inherited from class org.eclipse.persistence.internal.jpa.deployment.ArchiveBase
getDescriptorLocation, getDescriptorStream, getRootURL, setDescriptorLocation, setRootURL, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.persistence.jpa.Archive
getDescriptorStream, getRootURL
-
Constructor Details
-
JarFileArchive
public JarFileArchive(URL rootUrl, JarFile jarFile, String descriptorLocation) throws MalformedURLException - Throws:
MalformedURLException
-
JarFileArchive
public JarFileArchive(URL rootUrl, JarFile jarFile, String descriptorLocation, Logger logger) throws MalformedURLException - Throws:
MalformedURLException
-
-
Method Details
-
getEntries
Description copied from interface:ArchiveReturns anIteratorof the file entries. Each String represents a file name relative to the root of the module.- Specified by:
getEntriesin interfaceArchive
-
getEntry
Description copied from interface:ArchiveReturns the InputStream for the given entry name. Returns null if no such entry exists. The entry name must be relative to the root of the module.- Specified by:
getEntryin interfaceArchive- Specified by:
getEntryin classArchiveBase- Parameters:
entryPath- the file name relative to the root of the module.- Returns:
- the InputStream for the given entry name or null if not found.
- Throws:
IOException
-
getEntryAsURL
Description copied from interface:ArchiveReturns the URL for the given entry name. Returns null if no such entry exists. The entry name must be relative to the root of the module.- Specified by:
getEntryAsURLin interfaceArchive- Parameters:
entryPath- the file name relative to the root of the module.- Returns:
- the URL for the given entry name or null if not found.
- Throws:
IOException
-
close
public void close()Description copied from interface:ArchiveClose this archive and associated InputStream.
-