org.ow2.util.archive.impl
Class URLArchiveImpl
java.lang.Object
org.ow2.util.archive.impl.AbsArchiveImpl
org.ow2.util.archive.impl.URLArchiveImpl
- All Implemented Interfaces:
- IArchive
public class URLArchiveImpl
- extends AbsArchiveImpl
- implements IArchive
Implementation of an archive from an url targeting a jar.
- Author:
- Gael Lalire
URLArchiveImpl
public URLArchiveImpl(URL url)
throws IOException
- Constructor.
- Parameters:
url - the url targeting a jar
- Throws:
IOException - if jar could not be read
close
public boolean close()
- Close the archive.
- Specified by:
close in interface IArchive
- Returns:
- true
getName
public String getName()
- Get archive name.
- Specified by:
getName in interface IArchive
- Returns:
- the url path
getResource
public URL getResource(String resourceName)
- Specified by:
getResource in interface IArchive
- Parameters:
resourceName - the resource name
- Returns:
- a resource with resourceName
getResources
public Iterator<URL> getResources()
- Specified by:
getResources in interface IArchive
- Returns:
- all resources in jar
getResources
public Iterator<URL> getResources(String resourceName)
- Specified by:
getResources in interface IArchive
- Parameters:
resourceName - the resource name
- Returns:
- all resources with resourceName
getURL
public URL getURL()
- Specified by:
getURL in interface IArchive
- Returns:
- the url of archive
getEntries
public Iterator<String> getEntries()
- Specified by:
getEntries in interface IArchive
- Returns:
- all resources name
Copyright © 2007-2012 OW2 Consortium. All Rights Reserved.