|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface VirtualFile
A basic abstraction of a VirtualFile used by the OSGi layer. This abstraction should be removed once we settle on a single jboss-vfs version.
Method Summary | |
---|---|
void |
close()
Close the file resources (stream, etc.) |
Enumeration<URL> |
findEntries(String path,
String pattern,
boolean recurse)
Returns entries in this bundle and its attached fragments. |
VirtualFile |
getChild(String path)
Get a child |
List<VirtualFile> |
getChildren()
Get the children |
List<VirtualFile> |
getChildrenRecursively()
Get all children recursively |
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) |
Method Detail |
---|
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 system
IllegalStateException
- if the file is closedboolean isDirectory() throws IOException
IOException
- for any problem accessing the virtual file system
IllegalStateException
- if the file is closedURL toURL() throws IOException
MalformedURLException
- if a url cannot be parsed
IOException
- for any problem accessing the virtual file systemURL getStreamURL() throws IOException
IOException
VirtualFile getParent() throws IOException
IOException
- for any problem accessing the virtual file system
IllegalStateException
- if the file is closedVirtualFile getChild(String path) throws IOException
path
- the path
null
if not found
IOException
- for any problem accessing the VFS
IllegalArgumentException
- if the path is null
IllegalStateException
- 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 system
IllegalStateException
- if the file is closedList<VirtualFile> getChildren() throws IOException
This always uses VisitorAttributes#RECURSE
IOException
- for any problem accessing the virtual file system
IllegalStateException
- 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 system
IllegalStateException
- if the file is closedvoid close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |