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

public Class URLArchive

extends ArchiveBase
implements Archive
Class Inheritance
All Implemented Interfaces
org.eclipse.persistence.jpa.Archive
Imports
java.io.IOException, .InputStream, java.net.URL, java.util.Collections, .Iterator, org.eclipse.persistence.jpa.Archive

This is an implementation of Archive when container returns a url that is not one of the familiar URL types like file or jar URLs. So, we can not recursively walk thru' its hierarchy. As a result getEntries() returns an empty collection.
Author
[email protected]

Field Summary

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

Constructor Summary

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

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.
Inherited from org.eclipse.persistence.internal.jpa.deployment.ArchiveBase:
getDescriptorLocationgetDescriptorStreamgetRootURLsetDescriptorLocationsetRootURLtoString

Constructor Detail

URLArchiveback to summary
public URLArchive(URL url, String descriptorLocation)

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