Class URLArchive
- java.lang.Object
-
- org.eclipse.persistence.internal.jpa.deployment.ArchiveBase
-
- org.eclipse.persistence.internal.jpa.deployment.URLArchive
-
- All Implemented Interfaces:
Archive
public class URLArchive extends ArchiveBase implements Archive
This is an implementation ofArchivewhen 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 resultgetEntries()returns an empty collection.- Author:
- Sanjeeb.Sahoo@Sun.COM
-
-
Field Summary
-
Fields inherited from class org.eclipse.persistence.internal.jpa.deployment.ArchiveBase
descriptorLocation, rootURL
-
-
Constructor Summary
Constructors Constructor Description URLArchive(java.net.URL url, java.lang.String descriptorLocation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close this archive and associated InputStream.java.util.Iterator<java.lang.String>getEntries()Returns anIteratorof the file entries.java.io.InputStreamgetEntry(java.lang.String entryPath)Returns the InputStream for the given entry name.java.net.URLgetEntryAsURL(java.lang.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
-
-
-
-
Method Detail
-
getEntries
public java.util.Iterator<java.lang.String> 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
public java.io.InputStream getEntry(java.lang.String entryPath) throws java.io.IOExceptionDescription 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:
java.io.IOException
-
getEntryAsURL
public java.net.URL getEntryAsURL(java.lang.String entryPath) throws java.io.IOExceptionDescription 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:
java.io.IOException
-
-