|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.aries.util.filesystem.impl.ZipFileImpl
org.apache.aries.util.filesystem.impl.ZipDirectory
public class ZipDirectory
A directory in the zip.
| Field Summary |
|---|
| Fields inherited from class org.apache.aries.util.filesystem.impl.ZipFileImpl |
|---|
cache, entry, zip |
| Constructor Summary | |
|---|---|
ZipDirectory(File fs,
IDirectory parent)
This constructor creates the root of the zip. |
|
ZipDirectory(File zip1,
ZipEntry entry1,
ZipDirectory parent,
ZipCloseableDirectory cache)
Constructs a directory in the zip. |
|
ZipDirectory(ZipDirectory other,
ZipCloseableDirectory cache)
|
|
| Method Summary | |
|---|---|
IDirectory |
convert()
|
boolean |
equals(Object other)
|
IFile |
getFile(String name)
Gets the requested file under this directory. |
IDirectory |
getRoot()
|
int |
hashCode()
|
boolean |
isDirectory()
|
boolean |
isFile()
|
protected static boolean |
isInDir(String parentDir,
ZipEntry possibleEntry,
boolean allowSubDirs)
This method works out if the provided entry is inside this directory. |
boolean |
isRoot()
|
boolean |
isZipRoot()
|
Iterator<IFile> |
iterator()
|
List<IFile> |
listAllFiles()
|
List<IFile> |
listFiles()
|
InputStream |
open()
The input stream returned by this method should always be closed after use. |
ICloseableDirectory |
toCloseable()
Open a more effective implementation with user regulated resource management. |
| Methods inherited from class org.apache.aries.util.filesystem.impl.ZipFileImpl |
|---|
convertNested, getLastModified, getName, getNameInZip, getParent, getSize, getZipPathToRoot, toString, toURL |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.aries.util.filesystem.IFile |
|---|
convertNested, getLastModified, getName, getParent, getSize, toURL |
| Constructor Detail |
|---|
public ZipDirectory(File zip1,
ZipEntry entry1,
ZipDirectory parent,
ZipCloseableDirectory cache)
zip1 - the zip file.entry1 - the entry in the zip representing this dir.parent - the parent directory.
public ZipDirectory(File fs,
IDirectory parent)
throws MalformedURLException
file - fs - parent -
MalformedURLException
public ZipDirectory(ZipDirectory other,
ZipCloseableDirectory cache)
| Method Detail |
|---|
public IFile getFile(String name)
IDirectory
getFile in interface IDirectoryname - the name of the file.
public boolean isRoot()
isRoot in interface IDirectorypublic List<IFile> listFiles()
listFiles in interface IDirectorypublic List<IFile> listAllFiles()
listAllFiles in interface IDirectory
protected static boolean isInDir(String parentDir,
ZipEntry possibleEntry,
boolean allowSubDirs)
possibleEntry - whether - files in subdirectories are to be included
public Iterator<IFile> iterator()
iterator in interface Iterable<IFile>public IDirectory convert()
convert in interface IFileconvert in class ZipFileImplpublic boolean isDirectory()
isDirectory in interface IFileisDirectory in class ZipFileImplpublic boolean isFile()
isFile in interface IFileisFile in class ZipFileImplpublic InputStream open()
IFile
open in interface IFileopen in class ZipFileImplpublic IDirectory getRoot()
getRoot in interface IFilegetRoot in class ZipFileImplpublic boolean isZipRoot()
public boolean equals(Object other)
equals in class ZipFileImplpublic int hashCode()
hashCode in class ZipFileImplpublic ICloseableDirectory toCloseable()
IDirectory
toCloseable in interface IDirectoryICloseableDirectory or null if a batch aware version of this IDirectory is not supported
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||