public class ZipBundleFile extends BundleFile
Modifier and Type | Field and Description |
---|---|
protected BaseData |
bundledata
The bundle data
|
protected boolean |
closed
The closed flag
|
protected ZipFile |
zipFile
The zip file
|
basefile, PROP_SETPERMS_CMD
Constructor and Description |
---|
ZipBundleFile(File basefile,
BaseData bundledata)
Constructs a ZipBundle File
|
ZipBundleFile(File basefile,
BaseData bundledata,
MRUBundleFileList mruList) |
Modifier and Type | Method and Description |
---|---|
protected ZipFile |
basicOpen()
Opens the ZipFile for this bundle file
|
protected boolean |
checkedOpen()
Checks if the zip file is open
|
void |
close()
Closes the BundleFile.
|
boolean |
containsDir(String dir)
Determines if any BundleEntries exist in the given directory path.
|
protected File |
extractDirectory(String dirName)
Extracts a directory and all sub content to disk
|
BundleEntry |
getEntry(String path)
Locates a file name in this bundle and returns a BundleEntry object
|
Enumeration<String> |
getEntryPaths(String path)
Allows to access the entries of the bundle.
|
Enumeration<String> |
getEntryPaths(String path,
boolean doRecurse) |
protected File |
getExtractFile(String entryName) |
File |
getFile(String entry,
boolean nativeCode)
Returns a File for the bundle entry specified by the path.
|
protected ZipEntry |
getZipEntry(String path)
Returns a ZipEntry for the bundle file.
|
protected ZipFile |
getZipFile()
Returns an open ZipFile for this bundle file.
|
void |
open()
Opens the BundleFiles.
|
fixTrailingSlash, getBaseFile, getResourceURL, getResourceURL, getResourceURL, setPermissions, toString
protected BaseData bundledata
protected volatile ZipFile zipFile
protected volatile boolean closed
public ZipBundleFile(File basefile, BaseData bundledata) throws IOException
basefile
- the base filebundledata
- the bundle dataIOException
public ZipBundleFile(File basefile, BaseData bundledata, MRUBundleFileList mruList) throws IOException
IOException
protected boolean checkedOpen()
protected ZipFile basicOpen() throws IOException
IOException
protected ZipFile getZipFile() throws IOException
IOException
protected ZipEntry getZipEntry(String path)
path
- the path to an entryprotected File extractDirectory(String dirName)
dirName
- the directory name to extractnull
is returned if the directory to extract does
not exist or if content extraction is not supported.public File getFile(String entry, boolean nativeCode)
BundleFile
getFile
in class BundleFile
entry
- The path to the entry to locate a File for.nativeCode
- true if the path is native code.public boolean containsDir(String dir)
BundleFile
containsDir
in class BundleFile
dir
- The directory path to check existence of.public BundleEntry getEntry(String path)
BundleFile
getEntry
in class BundleFile
path
- path of the entry to locate in the bundlepublic Enumeration<String> getEntryPaths(String path)
BundleFile
getEntryPaths
in class BundleFile
path
- path of the entry to locate in the bundlepublic Enumeration<String> getEntryPaths(String path, boolean doRecurse)
public void close() throws IOException
BundleFile
close
in class BundleFile
IOException
- if any error occurs.public void open()
BundleFile
open
in class BundleFile
Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.