org.apache.aries.application.utils.filesystem.impl
Class ZipDirectory

java.lang.Object
  extended by org.apache.aries.application.utils.filesystem.impl.ZipFileImpl
      extended by org.apache.aries.application.utils.filesystem.impl.ZipDirectory
All Implemented Interfaces:
Iterable<IFile>, IDirectory, IFile

public class ZipDirectory
extends ZipFileImpl
implements IDirectory

A directory in the zip.


Field Summary
 
Fields inherited from class org.apache.aries.application.utils.filesystem.impl.ZipFileImpl
entry, zip
 
Constructor Summary
ZipDirectory(File file, File fs)
          This constructor creates the root of the zip.
ZipDirectory(File zip1, ZipEntry entry1, ZipDirectory parent)
          Constructs a directory in the zip.
 
Method Summary
 IDirectory convert()
           
 boolean equals(Object other)
           
 IFile getFile(String name)
           
 IDirectory getParent()
           
 IDirectory getRoot()
           
 int hashCode()
           
 boolean isDirectory()
           
 boolean isFile()
           
 boolean isRoot()
           
 Iterator<IFile> iterator()
           
 List<IFile> listAllFiles()
           
 List<IFile> listFiles()
           
 InputStream open()
           
 
Methods inherited from class org.apache.aries.application.utils.filesystem.impl.ZipFileImpl
getLastModified, getName, getSize, toString, toURL
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.aries.application.filesystem.IFile
getLastModified, getName, getSize, toURL
 

Constructor Detail

ZipDirectory

public ZipDirectory(File zip1,
                    ZipEntry entry1,
                    ZipDirectory parent)
Constructs a directory in the zip.

Parameters:
zip1 - the zip file.
entry1 - the entry in the zip representing this dir.
parent - the parent directory.

ZipDirectory

public ZipDirectory(File file,
                    File fs)
             throws MalformedURLException
This constructor creates the root of the zip.

Parameters:
file -
fs -
Throws:
MalformedURLException
Method Detail

getFile

public IFile getFile(String name)
Specified by:
getFile in interface IDirectory

isRoot

public boolean isRoot()
Specified by:
isRoot in interface IDirectory

listFiles

public List<IFile> listFiles()
Specified by:
listFiles in interface IDirectory

listAllFiles

public List<IFile> listAllFiles()
Specified by:
listAllFiles in interface IDirectory

iterator

public Iterator<IFile> iterator()
Specified by:
iterator in interface Iterable<IFile>

convert

public IDirectory convert()
Specified by:
convert in interface IFile
Overrides:
convert in class ZipFileImpl

getParent

public IDirectory getParent()
Specified by:
getParent in interface IFile
Overrides:
getParent in class ZipFileImpl

isDirectory

public boolean isDirectory()
Specified by:
isDirectory in interface IFile
Overrides:
isDirectory in class ZipFileImpl

isFile

public boolean isFile()
Specified by:
isFile in interface IFile
Overrides:
isFile in class ZipFileImpl

open

public InputStream open()
Specified by:
open in interface IFile
Overrides:
open in class ZipFileImpl

getRoot

public IDirectory getRoot()
Specified by:
getRoot in interface IFile
Overrides:
getRoot in class ZipFileImpl

equals

public boolean equals(Object other)
Overrides:
equals in class ZipFileImpl

hashCode

public int hashCode()
Overrides:
hashCode in class ZipFileImpl


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.