public final class ZipRepository extends AbstractRepository
SEPARATOR| Constructor and Description |
|---|
ZipRepository(File file)
Constructs a ZipRespository using the given zip file.
|
ZipRepository(String path)
Constructs a ZipRespository using the given zip file.
|
| Modifier and Type | Method and Description |
|---|---|
protected AbstractRepository |
createChildRepository(String name)
Create a new child reposiotory with the given name.
|
boolean |
equals(Object obj) |
boolean |
exists()
Checks wether this resource actually (still) exists
|
long |
getChecksum()
Checksum of the resource content.
|
Repository[] |
getRepositories()
Returns this repository's direct child repositories
|
protected void |
getResources(List<Resource> list,
boolean recursive)
Add the repository's resources into the list, optionally descending into
nested repositories.
|
URL |
getUrl()
Returns an url to the resource if the repository of this resource is
able to provide urls.
|
protected ZipFile |
getZipFile()
Returns a java.util.zip.ZipFile for this repository.
|
int |
hashCode() |
long |
lastModified()
Returns the date the resource was last modified
|
protected Resource |
lookupResource(String name)
Called to create a child resource for this repository.
|
String |
toString()
Returns the repositories full path as string representation.
|
getChildRepository, getModuleName, getName, getParentRepository, getPath, getRelativePath, getResource, getResources, getResources, getResources, getRootRepository, isAbsolute, lookupRepository, resolve, setAbsolute, setRootpublic ZipRepository(String path) throws ZipException, IOException
path - path to zip fileZipException - a zip encoding related error occurredIOException - an I/O error occurredpublic ZipRepository(File file) throws ZipException, IOException
file - zip fileZipException - a zip encoding related error occurredIOException - an I/O error occurredprotected ZipFile getZipFile() throws IOException
IOException - an I/O related error occurredprotected Resource lookupResource(String name) throws IOException
lookupResource in class AbstractRepositoryname - the name of the child resourceIOException - an I/O error occurredpublic boolean exists()
throws IOException
IOExceptionprotected AbstractRepository createChildRepository(String name) throws IOException
AbstractRepositorycreateChildRepository in class AbstractRepositoryname - the nameIOException - an I/O error occurredprotected void getResources(List<Resource> list, boolean recursive) throws IOException
AbstractRepositorygetResources in class AbstractRepositorylist - the list to add the resources torecursive - whether to descend into nested repositoriesIOException - an I/O related error occurredpublic Repository[] getRepositories() throws IOException
RepositoryIOException - an I/O error occurredpublic URL getUrl() throws MalformedURLException
TrackableMalformedURLExceptionpublic long lastModified()
Trackablepublic long getChecksum()
Trackablepublic String toString()
AbstractRepositorytoString in class AbstractRepositoryAbstractRepository.getPath()Copyright © 2016. All rights reserved.