org.ow2.easybeans.persistence.eclipselink.deployment
Class BundleArchive

java.lang.Object
  extended by org.eclipse.persistence.internal.jpa.deployment.ArchiveBase
      extended by org.ow2.easybeans.persistence.eclipselink.deployment.BundleArchive
All Implemented Interfaces:
org.eclipse.persistence.jpa.Archive

public class BundleArchive
extends org.eclipse.persistence.internal.jpa.deployment.ArchiveBase
implements org.eclipse.persistence.jpa.Archive


Field Summary
 
Fields inherited from class org.eclipse.persistence.internal.jpa.deployment.ArchiveBase
descriptorLocation, rootURL
 
Constructor Summary
BundleArchive(URL url, String descriptorLocation)
           
 
Method Summary
 void close()
           
 Iterator<String> getEntries()
          Returns an Iterator of the file entries.
 InputStream getEntry(String entryPath)
          Returns the InputStream for the given entry name.
 URL getEntryAsURL(String entryPath)
          Returns the URL for the given entry name.
 
Methods inherited from class org.eclipse.persistence.internal.jpa.deployment.ArchiveBase
getDescriptorLocation, getDescriptorStream, getRootURL, setDescriptorLocation, setRootURL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.persistence.jpa.Archive
getDescriptorStream, getRootURL
 

Constructor Detail

BundleArchive

public BundleArchive(URL url,
                     String descriptorLocation)
Method Detail

getEntries

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

Specified by:
getEntries in interface org.eclipse.persistence.jpa.Archive

getEntry

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.

Specified by:
getEntry in interface org.eclipse.persistence.jpa.Archive
Specified by:
getEntry in class org.eclipse.persistence.internal.jpa.deployment.ArchiveBase
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

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.

Specified by:
getEntryAsURL in interface org.eclipse.persistence.jpa.Archive
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

close

public void close()
Specified by:
close in interface org.eclipse.persistence.jpa.Archive


Copyright © 2006-2012 OW2 Consortium. All Rights Reserved.