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, toStringprotected BaseData bundledata
protected volatile ZipFile zipFile
protected volatile boolean closed
public ZipBundleFile(File basefile, BaseData bundledata) throws IOException
basefile - the base filebundledata - the bundle dataIOExceptionpublic ZipBundleFile(File basefile, BaseData bundledata, MRUBundleFileList mruList) throws IOException
IOExceptionprotected boolean checkedOpen()
protected ZipFile basicOpen() throws IOException
IOExceptionprotected ZipFile getZipFile() throws IOException
IOExceptionprotected 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)
BundleFilegetFile in class BundleFileentry - The path to the entry to locate a File for.nativeCode - true if the path is native code.public boolean containsDir(String dir)
BundleFilecontainsDir in class BundleFiledir - The directory path to check existence of.public BundleEntry getEntry(String path)
BundleFilegetEntry in class BundleFilepath - path of the entry to locate in the bundlepublic Enumeration<String> getEntryPaths(String path)
BundleFilegetEntryPaths in class BundleFilepath - path of the entry to locate in the bundlepublic Enumeration<String> getEntryPaths(String path, boolean doRecurse)
public void close()
throws IOException
BundleFileclose in class BundleFileIOException - if any error occurs.public void open()
BundleFileopen in class BundleFileCopyright © 2007–2016 The Apache Software Foundation. All rights reserved.