Class ZipFileImpl
java.lang.Object
org.apache.aries.util.filesystem.impl.ZipFileImpl
- All Implemented Interfaces:
IFile
- Direct Known Subclasses:
ZipDirectory
An implementation of IFile that represents a file entry in a zip.
-
Constructor Summary
ConstructorsConstructorDescriptionZipFileImpl
(File zip1, 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
-
Constructor Details
-
ZipFileImpl
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
-
-
Method Details
-
getZipPathToRoot
Obtain the path of the zip file to the VFS root -
convert
-
convertNested
- Specified by:
convertNested
in interfaceIFile
- Returns:
- if this is a directory or an archive, returns the opened IDirectory
-
getLastModified
public long getLastModified()- Specified by:
getLastModified
in interfaceIFile
- Returns:
- the last modified date of the file.
-
getName
-
getNameInZip
-
getParent
-
getSize
public long getSize() -
isDirectory
public boolean isDirectory()- Specified by:
isDirectory
in interfaceIFile
- Returns:
- true iff this IFile is also an IDirectory
-
isFile
public boolean isFile() -
open
Description copied from interface:IFile
The input stream returned by this method should always be closed after use.- Specified by:
open
in interfaceIFile
- Returns:
- An InputStream to read the file from.
- Throws:
IOException
-
getRoot
-
toURL
- Specified by:
toURL
in interfaceIFile
- Returns:
- a URL that can be used to get at this file at a later date.
- Throws:
MalformedURLException
-
equals
-
hashCode
public int hashCode() -
toString
-