Top Description Fields Constructors Methods
org.eclipse.persistence.internal.jpa.deployment

public Class DirectoryInsideJarURLArchive

extends ArchiveBase
implements Archive
Class Inheritance
All Implemented Interfaces
org.eclipse.persistence.jpa.Archive
Imports
java.net.URL, .JarURLConnection, java.util.List, .ArrayList, .Enumeration, .Iterator, java.util.logging.Logger, .Level, java.util.jar.JarFile, .JarEntry, java.io.IOException, .InputStream, org.eclipse.persistence.jpa.Archive

This is an implementation of Archive which is used when container returns a jar: URL. e.g. jar:file:/tmp/a_ear/b.war!/WEB-INF/classes/
Author
[email protected]

Field Summary

Modifier and TypeField and Description
private List<String>
private JarFile
private Logger
private String
Inherited from org.eclipse.persistence.internal.jpa.deployment.ArchiveBase:
descriptorLocationrootURL

Constructor Summary

AccessConstructor and Description
public
DirectoryInsideJarURLArchive(URL url, String descriptorLocation)

public
DirectoryInsideJarURLArchive(URL url, String descriptorLocation, Logger logger)

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements org.eclipse.persistence.jpa.Archive.close.

Close this archive and associated InputStream.
public Iterator<String>
public InputStream
getEntry(String
the file name relative to the root of the module.
entryPath
)

Implements abstract org.eclipse.persistence.internal.jpa.deployment.ArchiveBase.getEntry.

Implements org.eclipse.persistence.jpa.Archive.getEntry.

Returns the InputStream for the given entry name.
public URL
getEntryAsURL(String
the file name relative to the root of the module.
entryPath
)

Implements org.eclipse.persistence.jpa.Archive.getEntryAsURL.

Returns the URL for the given entry name.
private void
init()

Inherited from org.eclipse.persistence.internal.jpa.deployment.ArchiveBase:
getDescriptorLocationgetDescriptorStreamgetRootURLsetDescriptorLocationsetRootURLtoString

Field Detail

entriesback to summary
private List<String> entries
jarFileback to summary
private JarFile jarFile
loggerback to summary
private Logger logger
Annotations
@SuppressWarnings:unused
relativeRootPathback to summary
private String relativeRootPath

Constructor Detail

DirectoryInsideJarURLArchiveback to summary
public DirectoryInsideJarURLArchive(URL url, String descriptorLocation) throws IOException
Annotations
@SuppressWarnings:deprecation
DirectoryInsideJarURLArchiveback to summary
public DirectoryInsideJarURLArchive(URL url, String descriptorLocation, Logger logger) throws IOException

Method Detail

closeback to summary
public void close()

Implements org.eclipse.persistence.jpa.Archive.close.

Doc from org.eclipse.persistence.jpa.Archive.close.

Close this archive and associated InputStream.

Annotations
@Override
getEntriesback to summary
public Iterator<String> getEntries()

Implements org.eclipse.persistence.jpa.Archive.getEntries.

Doc from org.eclipse.persistence.jpa.Archive.getEntries.

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

Annotations
@Override
getEntryback to summary
public InputStream getEntry(String entryPath) throws IOException

Implements abstract org.eclipse.persistence.internal.jpa.deployment.ArchiveBase.getEntry.

Implements org.eclipse.persistence.jpa.Archive.getEntry.

Doc from org.eclipse.persistence.jpa.Archive.getEntry.

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.

Annotations
@Override
getEntryAsURLback to summary
public URL getEntryAsURL(String entryPath) throws IOException

Implements org.eclipse.persistence.jpa.Archive.getEntryAsURL.

Doc from org.eclipse.persistence.jpa.Archive.getEntryAsURL.

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.

Annotations
@Override
initback to summary
private void init()