public class BundleFileWrapperChain extends BundleFile
BundleFileWrapperFactoryHook
.
This class is useful for traversing the chain of wrapped bundle files.basefile, PROP_SETPERMS_CMD
Constructor and Description |
---|
BundleFileWrapperChain(BundleFile wrapped,
BundleFileWrapperChain next) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the BundleFile.
|
boolean |
containsDir(String dir)
Determines if any BundleEntries exist in the given directory path.
|
File |
getBaseFile()
Returns the base file for this BundleFile
|
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.
|
File |
getFile(String path,
boolean nativeCode)
Returns a File for the bundle entry specified by the path.
|
BundleFileWrapperChain |
getNext()
The next WrapperBundleFile in the chain.
|
URL |
getResourceURL(String path,
BaseData hostData,
int index)
Returns a URL to access the contents of the entry specified by the path
|
BundleFile |
getWrapped()
The BundleFile that is wrapped
|
void |
open()
Opens the BundleFiles.
|
String |
toString() |
fixTrailingSlash, getResourceURL, getResourceURL, setPermissions
public BundleFileWrapperChain(BundleFile wrapped, BundleFileWrapperChain next)
public void close() throws IOException
BundleFile
close
in class BundleFile
IOException
- if any error occurs.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 File getFile(String path, boolean nativeCode)
BundleFile
getFile
in class BundleFile
path
- The path to the entry to locate a File for.nativeCode
- true if the path is native code.public void open() throws IOException
BundleFile
open
in class BundleFile
IOException
- if any error occurs.public File getBaseFile()
BundleFile
getBaseFile
in class BundleFile
public URL getResourceURL(String path, BaseData hostData, int index)
BundleFile
getResourceURL
in class BundleFile
path
- the path to the resourcehostData
- the host BaseDataindex
- the resource indexpublic String toString()
toString
in class BundleFile
public BundleFile getWrapped()
public BundleFileWrapperChain getNext()
null
value
is returned if this is the end of the chain.Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.