Interface Archive

All Known Implementing Classes:
InMemoryArchive, org.eclipse.persistence.internal.jpa.deployment.URLArchive

public interface Archive
Provides an abstraction to deal with various kinds of URLs that can be returned by PersistenceUnitInfo.getPersistenceUnitRootUrl()
See Also:
  • ArchiveFactoryImpl
Author:
Sanjeeb.Sahoo@Sun.COM
  • Method Details

    • getEntries

      Iterator<String> getEntries()
      Returns an Iterator of the file entries. Each String represents a file name relative to the root of the module.
    • getEntry

      InputStream getEntry(String entryPath) throws IOException
      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.
      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

      URL getEntryAsURL(String entryPath) throws IOException
      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.
      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
    • getRootURL

      URL getRootURL()
      Returns:
      the URL that this archive represents.
    • getDescriptorStream

      InputStream getDescriptorStream() throws IOException
      Returns:
      an input stream on the persistence descriptor.
      Throws:
      IOException
    • close

      void close()
      Close this archive and associated InputStream.