Package org.eclipse.persistence.jpa
Interface Archive
-
- All Known Implementing Classes:
InMemoryArchive,org.eclipse.persistence.internal.jpa.deployment.URLArchive
public interface ArchiveProvides an abstraction to deal with various kinds of URLs that can be returned byPersistenceUnitInfo.getPersistenceUnitRootUrl()- See Also:
ArchiveFactoryImpl- Author:
- Sanjeeb.Sahoo@Sun.COM
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Close this archive and associated InputStream.java.io.InputStreamgetDescriptorStream()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.java.net.URLgetRootURL()
-
-
-
Method Detail
-
getEntries
java.util.Iterator<java.lang.String> getEntries()
Returns anIteratorof the file entries. Each String represents a file name relative to the root of the module.
-
getEntry
java.io.InputStream getEntry(java.lang.String entryPath) throws java.io.IOExceptionReturns 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.- 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
java.net.URL getEntryAsURL(java.lang.String entryPath) throws java.io.IOExceptionReturns 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.- 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
-
getRootURL
java.net.URL getRootURL()
- Returns:
- the URL that this archive represents.
-
getDescriptorStream
java.io.InputStream getDescriptorStream() throws java.io.IOException- Returns:
- an input stream on the persistence descriptor.
- Throws:
java.io.IOException
-
close
void close()
Close this archive and associated InputStream.
-
-