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

public Class JarInputStreamURLArchive

extends ArchiveBase
implements Archive
Class Inheritance
All Implemented Interfaces
org.eclipse.persistence.jpa.Archive
Imports
java.io.BufferedInputStream, .IOException, .InputStream, java.net.URL, java.util.ArrayList, .Iterator, .List, java.util.logging.Logger, java.util.jar.JarInputStream, java.util.zip.ZipEntry, org.eclipse.persistence.jpa.Archive

This is an implementation of Archive which is used when container returns some form of URL from which an InputStream in jar format can be obtained. e.g. jar:file:/tmp/a_ear/b.war!/WEB-INF/lib/pu.jar
Author
[email protected]

Field Summary

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

Constructor Summary

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

public
JarInputStreamURLArchive(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
loggerback to summary
private Logger logger
Annotations
@SuppressWarnings:unused

Constructor Detail

JarInputStreamURLArchiveback to summary
public JarInputStreamURLArchive(URL url, String descriptorLocation) throws IOException
Annotations
@SuppressWarnings:deprecation
JarInputStreamURLArchiveback to summary
public JarInputStreamURLArchive(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() throws IOException