public interface VirtualFile extends Closeable
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_VFS_LEAK_DEBUGGING
System property to enable detection of unclosed virtual files:
jboss.osgi.vfs.leakDebugging |
Modifier and Type | Method and Description |
---|---|
Enumeration<URL> |
findEntries(String path,
String pattern,
boolean recurse)
Returns entries in this bundle and its attached fragments.
|
Certificate[] |
getCertificates()
Get the
Certificate s for the virtual file. |
VirtualFile |
getChild(String path)
Get a child
|
List<VirtualFile> |
getChildren()
Get the children
|
List<VirtualFile> |
getChildrenRecursively()
Get all children recursively
|
CodeSigner[] |
getCodeSigners()
Get the
CodeSigner s for a the virtual file. |
Enumeration<String> |
getEntryPaths(String path)
Returns an Enumeration of all the paths (
String objects) to entries within this bundle whose longest
sub-path matches the specified path. |
String |
getName()
Get the simple VF name (X.java)
|
VirtualFile |
getParent()
Get the parent
|
String |
getPathName()
Get the VFS relative path name (org/jboss/X.java)
|
URL |
getStreamURL()
Get the URL used for streaming.
|
boolean |
isDirectory()
Whether it is a directory in the VFS.
|
boolean |
isFile()
Whether it is a file in the VFS.
|
InputStream |
openStream()
Access the file contents.
|
URL |
toURL()
Get the VF URL (vfs:/root/org/jboss/X.java)
|
static final String PROPERTY_VFS_LEAK_DEBUGGING
jboss.osgi.vfs.leakDebugging
String getName()
IllegalStateException
- if the file is closedString getPathName()
IllegalStateException
- if the file is closedboolean isFile() throws IOException
IOException
- for any problem accessing the virtual file systemIllegalStateException
- if the file is closedboolean isDirectory() throws IOException
IOException
- for any problem accessing the virtual file systemIllegalStateException
- if the file is closedURL toURL() throws IOException
MalformedURLException
- if a url cannot be parsedIOException
- for any problem accessing the virtual file systemURL getStreamURL() throws IOException
IOException
VirtualFile getParent() throws IOException
IOException
- for any problem accessing the virtual file systemIllegalStateException
- if the file is closedVirtualFile getChild(String path) throws IOException
path
- the pathnull
if not foundIOException
- for any problem accessing the VFSIllegalArgumentException
- if the path is nullIllegalStateException
- if the file is closed or it is a leaf nodeList<VirtualFile> getChildrenRecursively() throws IOException
This always uses VisitorAttributes#RECURSE
IOException
- for any problem accessing the virtual file systemIllegalStateException
- if the file is closedList<VirtualFile> getChildren() throws IOException
This always uses VisitorAttributes#RECURSE
IOException
- for any problem accessing the virtual file systemIllegalStateException
- if the file is closedEnumeration<URL> findEntries(String path, String pattern, boolean recurse) throws IOException
IOException
Bundle.findEntries(String path, String pattern, boolean recurse)
Enumeration<String> getEntryPaths(String path) throws IOException
String
objects) to entries within this bundle whose longest
sub-path matches the specified path. This bundle's class loader is not used to search for entries. Only the contents of
this bundle are searched.IOException
Bundle.getEntryPaths(String path)
InputStream openStream() throws IOException
IOException
- for any error accessing the file systemIllegalStateException
- if the file is closedCertificate[] getCertificates()
Certificate
s for the virtual file. Simply extracts the certificate entries from the code signers array.null
if not signedCodeSigner[] getCodeSigners()
CodeSigner
s for a the virtual file.CodeSigner
s for the virtual file, or null
if not signedCopyright © 2013 JBoss by Red Hat. All Rights Reserved.