EclipseLink 2.2.0, build 'v20110202-r8913' API Reference

org.eclipse.persistence.jpa
Interface Archive


public interface Archive

Provides an abstraction to deal with various kinds of URLs that can be returned by PersistenceUnitInfo.getPersistenceUnitRootUrl()

See Also:
ArchiveFactoryImpl
Author:
Sanjeeb.Sahoo@Sun.COM

Method Summary
 void close()
          Close this archive and associated InputStream.
 java.io.InputStream getDescriptorStream()
           
 java.util.Iterator<java.lang.String> getEntries()
          Returns an Iterator of the file entries.
 java.io.InputStream getEntry(java.lang.String entryPath)
          Returns the InputStream for the given entry name.
 java.net.URL getEntryAsURL(java.lang.String entryPath)
          Returns the URL for the given entry name.
 java.net.URL getRootURL()
           
 

Method Detail

getEntries

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


getEntry

java.io.InputStream getEntry(java.lang.String entryPath)
                             throws java.io.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 - the file name relative to the root of the module.
Returns:
the InputStream for the given entry name or null if not found.
Throws:
java.io.IOException

getEntryAsURL

java.net.URL getEntryAsURL(java.lang.String entryPath)
                           throws java.io.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 - the file name relative to the root of the module.
Returns:
the URL for the given entry name or null if not found.
Throws:
java.io.IOException

getRootURL

java.net.URL getRootURL()
Returns:
the URL that this archive represents.

getDescriptorStream

java.io.InputStream getDescriptorStream()
                                        throws java.io.IOException
Returns:
an input stream on the persistence descriptor.
Throws:
java.io.IOException

close

void close()
Close this archive and associated InputStream.


EclipseLink 2.2.0, build 'v20110202-r8913' API Reference