FileDocCategorySizeDatePackage
URLArchive.javaAPI DocGlassfish v2 API3657Thu Jul 26 10:51:00 BST 2007oracle.toplink.essentials.ejb.cmp3.persistence

URLArchive

public class URLArchive extends Object implements Archive
This is an implementation of {@link Archive} when container returns a url that is not one of the familiar URL types like file or jar URLs. So, we can not recurssively walk thru' it's hierarchy. As a result {@link #getEntries()} returns an empty collection.
author
Sanjeeb.Sahoo@Sun.COM

Fields Summary
private URL
url
The URL representation of this archive.
Constructors Summary
public URLArchive(URL url)

        this.url = url;
    
Methods Summary
public java.util.IteratorgetEntries()

        return Collections.EMPTY_LIST.iterator();
    
public java.io.InputStreamgetEntry(java.lang.String entryPath)

        URL subEntry = new URL(url, entryPath);
        InputStream is = null;
        try {
            is = subEntry.openStream();
        } catch (IOException ioe) {
            // we return null when entry does not exist
        }
        return is;
    
public java.net.URLgetEntryAsURL(java.lang.String entryPath)

        URL subEntry = new URL(url, entryPath);
        try {
            InputStream is = subEntry.openStream();
            is.close();
        } catch (IOException ioe) {
            return null; // return null when entry does not exist
        }
        return subEntry;
    
public java.net.URLgetRootURL()

        return url;