Module org.eclipse.persistence.jpa
Class URLArchive
java.lang.Object
org.eclipse.persistence.internal.jpa.deployment.ArchiveBase
org.eclipse.persistence.internal.jpa.deployment.URLArchive
- All Implemented Interfaces:
Archive
- Direct Known Subclasses:
InMemoryArchive
This is an implementation of
Archive
when container returns a url
that is not one of the familiar URL types like file or jar URLs. So, we can
not recursively walk thru' its hierarchy. As a result getEntries()
returns an empty collection.-
Field Summary
Fields inherited from class org.eclipse.persistence.internal.jpa.deployment.ArchiveBase
descriptorLocation, rootURL
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close this archive and associated InputStream.Returns anIterator
of 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, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.persistence.jpa.Archive
getDescriptorStream, getRootURL
-
Constructor Details
-
URLArchive
-
-
Method Details
-
getEntries
Description copied from interface:Archive
Returns anIterator
of the file entries. Each String represents a file name relative to the root of the module.- Specified by:
getEntries
in interfaceArchive
-
getEntry
Description copied from interface:Archive
Returns 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:
getEntry
in interfaceArchive
- Specified by:
getEntry
in 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:Archive
Returns 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:
getEntryAsURL
in 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:Archive
Close this archive and associated InputStream.
-