public class ZipFileImpl extends Object implements IFile
Modifier and Type | Field and Description |
---|---|
protected ZipCloseableDirectory |
cache
The closeable directory that caches the open ZipFile
|
protected ZipEntry |
entry
The entry in the zip this IFile represents
|
protected File |
zip
The zip file this is contained in
|
Modifier | Constructor and Description |
---|---|
protected |
ZipFileImpl(File zip1,
IDirectory parent)
This is called to construct the root directory of the zip.
|
|
ZipFileImpl(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) |
Modifier and Type | Method and Description |
---|---|
IDirectory |
convert() |
IDirectory |
convertNested() |
boolean |
equals(Object obj) |
long |
getLastModified() |
String |
getName() |
String |
getNameInZip() |
IDirectory |
getParent() |
IDirectory |
getRoot() |
long |
getSize() |
String |
getZipPathToRoot()
Obtain the path of the zip file to the VFS root
|
int |
hashCode() |
boolean |
isDirectory() |
boolean |
isFile() |
InputStream |
open()
The input stream returned by this method should always be closed after use.
|
String |
toString() |
URL |
toURL() |
protected final File zip
protected final ZipEntry entry
protected final ZipCloseableDirectory cache
public ZipFileImpl(File zip1, ZipEntry entry1, ZipDirectory parent1, ZipCloseableDirectory cache)
zip1
- the zip file the entry is in.entry1
- the entry this IFile represents.parent1
- the parent directory.protected ZipFileImpl(File zip1, IDirectory parent) throws MalformedURLException
zip1
- the zip file this represents.fs
- the file on the fs.rootName
- the name of this zipfile relative to the IFile filesystem rootMalformedURLException
public ZipFileImpl(ZipFileImpl other, ZipCloseableDirectory cache)
public String getZipPathToRoot()
public IDirectory convert()
public IDirectory convertNested()
convertNested
in interface IFile
public long getLastModified()
getLastModified
in interface IFile
public String getName()
public String getNameInZip()
public IDirectory getParent()
public long getSize()
public boolean isDirectory()
isDirectory
in interface IFile
public boolean isFile()
public InputStream open() throws IOException
IFile
open
in interface IFile
IOException
public IDirectory getRoot()
public URL toURL() throws MalformedURLException
toURL
in interface IFile
MalformedURLException
Copyright © 2013. All rights reserved.