Top Description Methods
org.eclipse.persistence.jpa

public Interface Archive

Known Direct Implementers
org.eclipse.persistence.internal.jpa.deployment.DirectoryArchive, org.eclipse.persistence.internal.jpa.deployment.DirectoryInsideJarURLArchive, org.eclipse.persistence.internal.jpa.deployment.JarFileArchive, org.eclipse.persistence.internal.jpa.deployment.JarInputStreamURLArchive, org.eclipse.persistence.internal.jpa.deployment.URLArchive
Imports
java.util.Iterator, java.io.InputStream, .IOException, java.net.URL

Provides an abstraction to deal with various kinds of URLs that can be returned by jakarta.persistence.spi.PersistenceUnitInfo#getPersistenceUnitRootUrl()
Author
[email protected]
See Also
ArchiveFactoryImpl

Method Summary

Modifier and TypeMethod and Description
public void
close()

Close this archive and associated InputStream.

public InputStream

Returns:

an input stream on the persistence descriptor.
getDescriptorStream
()

public Iterator<String>
getEntries()

Returns an java.util.Iterator of the file entries.

public InputStream

Returns:

the InputStream for the given entry name or null if not found.
getEntry
(String
the file name relative to the root of the module.
entryPath
)

Returns the InputStream for the given entry name.

public URL

Returns:

the URL for the given entry name or null if not found.
getEntryAsURL
(String
the file name relative to the root of the module.
entryPath
)

Returns the URL for the given entry name.

public URL

Returns:

the URL that this archive represents.
getRootURL
()

Method Detail

closeback to summary
public void close()

Close this archive and associated InputStream.

getDescriptorStreamback to summary
public InputStream getDescriptorStream() throws IOException
Returns:InputStream

an input stream on the persistence descriptor.

getEntriesback to summary
public Iterator<String> getEntries()

Returns an java.util.Iterator of the file entries. Each String represents a file name relative to the root of the module.

getEntryback to summary
public 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:String

the file name relative to the root of the module.

Returns:InputStream

the InputStream for the given entry name or null if not found.

getEntryAsURLback to summary
public 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:String

the file name relative to the root of the module.

Returns:URL

the URL for the given entry name or null if not found.

getRootURLback to summary
public URL getRootURL()
Returns:URL

the URL that this archive represents.