Class NestedZipFile
- java.lang.Object
-
- org.apache.aries.util.filesystem.impl.NestedZipFile
-
- All Implemented Interfaces:
IFile
- Direct Known Subclasses:
NestedZipDirectory
public class NestedZipFile extends java.lang.Object implements IFile
-
-
Constructor Summary
Constructors Constructor Description NestedZipFile(IFile archive)
NestedZipFile(IFile archive, java.lang.String pathInZip, NestedZipDirectory parent, NestedCloseableDirectory cache)
NestedZipFile(IFile archive, java.util.zip.ZipEntry entry, NestedZipDirectory parent, NestedCloseableDirectory cache)
Construct a nested zip fileNestedZipFile(NestedZipFile other, NestedCloseableDirectory cache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IDirectory
convert()
IDirectory
convertNested()
boolean
equals(java.lang.Object obj)
long
getLastModified()
java.lang.String
getName()
java.lang.String
getNameInZip()
IDirectory
getParent()
IDirectory
getRoot()
long
getSize()
int
hashCode()
boolean
isDirectory()
boolean
isFile()
java.io.InputStream
open()
The input stream returned by this method should always be closed after use.java.lang.String
toString()
java.net.URL
toURL()
-
-
-
Constructor Detail
-
NestedZipFile
public NestedZipFile(IFile archive, java.util.zip.ZipEntry entry, NestedZipDirectory parent, NestedCloseableDirectory cache)
Construct a nested zip file- Parameters:
archive
-entry
-parent
-
-
NestedZipFile
public NestedZipFile(IFile archive, java.lang.String pathInZip, NestedZipDirectory parent, NestedCloseableDirectory cache)
-
NestedZipFile
public NestedZipFile(IFile archive)
-
NestedZipFile
public NestedZipFile(NestedZipFile other, NestedCloseableDirectory cache)
-
-
Method Detail
-
getNameInZip
public java.lang.String getNameInZip()
-
getName
public java.lang.String getName()
-
isDirectory
public boolean isDirectory()
- Specified by:
isDirectory
in interfaceIFile
- Returns:
- true iff this IFile is also an IDirectory
-
isFile
public boolean isFile()
-
getLastModified
public long getLastModified()
- Specified by:
getLastModified
in interfaceIFile
- Returns:
- the last modified date of the file.
-
getSize
public long getSize()
-
convert
public IDirectory convert()
-
convertNested
public IDirectory convertNested()
- Specified by:
convertNested
in interfaceIFile
- Returns:
- if this is a directory or an archive, returns the opened IDirectory
-
getParent
public IDirectory getParent()
-
open
public java.io.InputStream open() throws java.io.IOException, java.lang.UnsupportedOperationException
Description copied from interface:IFile
The 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:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-