Class ZipFileImpl
- java.lang.Object
 - 
- org.apache.aries.util.filesystem.impl.ZipFileImpl
 
 
- 
- All Implemented Interfaces:
 IFile
- Direct Known Subclasses:
 ZipDirectory
public class ZipFileImpl extends java.lang.Object implements IFile
An implementation of IFile that represents a file entry in a zip. 
- 
- 
Constructor Summary
Constructors Constructor Description ZipFileImpl(java.io.File zip1, java.util.zip.ZipEntry entry1, ZipDirectory parent1, ZipCloseableDirectory cache)This constructor is used to create a file entry within the zip.ZipFileImpl(ZipFileImpl other, ZipCloseableDirectory cache) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IDirectoryconvert()IDirectoryconvertNested()booleanequals(java.lang.Object obj)longgetLastModified()java.lang.StringgetName()java.lang.StringgetNameInZip()IDirectorygetParent()IDirectorygetRoot()longgetSize()java.lang.StringgetZipPathToRoot()Obtain the path of the zip file to the VFS rootinthashCode()booleanisDirectory()booleanisFile()java.io.InputStreamopen()The input stream returned by this method should always be closed after use.java.lang.StringtoString()java.net.URLtoURL() 
 - 
 
- 
- 
Constructor Detail
- 
ZipFileImpl
public ZipFileImpl(java.io.File zip1, java.util.zip.ZipEntry entry1, ZipDirectory parent1, ZipCloseableDirectory cache)This constructor is used to create a file entry within the zip.- Parameters:
 zip1- the zip file the entry is in.entry1- the entry this IFile represents.parent1- the parent directory.
 
- 
ZipFileImpl
public ZipFileImpl(ZipFileImpl other, ZipCloseableDirectory cache)
 
 - 
 
- 
Method Detail
- 
getZipPathToRoot
public java.lang.String getZipPathToRoot()
Obtain the path of the zip file to the VFS root 
- 
convert
public IDirectory convert()
 
- 
convertNested
public IDirectory convertNested()
- Specified by:
 convertNestedin interfaceIFile- Returns:
 - if this is a directory or an archive, returns the opened IDirectory
 
 
- 
getLastModified
public long getLastModified()
- Specified by:
 getLastModifiedin interfaceIFile- Returns:
 - the last modified date of the file.
 
 
- 
getName
public java.lang.String getName()
 
- 
getNameInZip
public java.lang.String getNameInZip()
 
- 
getParent
public IDirectory getParent()
 
- 
getSize
public long getSize()
 
- 
isDirectory
public boolean isDirectory()
- Specified by:
 isDirectoryin interfaceIFile- Returns:
 - true iff this IFile is also an IDirectory
 
 
- 
isFile
public boolean isFile()
 
- 
open
public java.io.InputStream open() throws java.io.IOExceptionDescription copied from interface:IFileThe input stream returned by this method should always be closed after use. 
- 
getRoot
public IDirectory getRoot()
 
- 
toURL
public java.net.URL toURL() throws java.net.MalformedURLException 
- 
equals
public boolean equals(java.lang.Object obj)
- Overrides:
 equalsin classjava.lang.Object
 
- 
hashCode
public int hashCode()
- Overrides:
 hashCodein classjava.lang.Object
 
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
 - 
 
 -