Save This Page
Home » JBoss-5.1.0 » org » jboss » virtual » [javadoc | source]
org.jboss.virtual
public class: VirtualFile [javadoc | source]
java.lang.Object
   org.jboss.virtual.VirtualFile

All Implemented Interfaces:
    java$io$Serializable

Direct Known Subclasses:
    AssembledDirectory

A virtual file as seen by the user
Constructor:
 public VirtualFile(VirtualFileHandler handler) 
    Create a new VirtualFile.
    Parameters:
    handler - the handler
    Throws:
    IllegalArgumentException - if the handler is null
Method from org.jboss.virtual.VirtualFile Summary:
checkStreams,   cleanup,   close,   closeStreams,   delete,   delete,   equals,   exists,   findChild,   getChild,   getChildren,   getChildren,   getChildrenRecursively,   getChildrenRecursively,   getHandler,   getLastModified,   getName,   getParent,   getPathName,   getSize,   getVFS,   hasBeenModified,   hashCode,   isArchive,   isHidden,   isLeaf,   openStream,   toString,   toURI,   toURL,   visit
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.virtual.VirtualFile Detail:
 protected  void checkStreams() 
    Check if streams set exist.
 public  void cleanup() 
    Do file cleanup. e.g. delete temp files
 public  void close() 
    Close the file resources (stream, etc.)
 public  void closeStreams() 
    Close the streams
 public boolean delete() throws IOException 
    Delete this virtual file
 public boolean delete(int gracePeriod) throws IOException 
    Delete this virtual file
 public boolean equals(Object obj) 
 public boolean exists() throws IOException 
    Tests whether the underlying implementation file still exists.
 public VirtualFile findChild(String path) throws IOException 
Deprecated! use - getChild, and handle null if not found

    Find a child
 public VirtualFile getChild(String path) throws IOException 
    Get a child
 public List<VirtualFile> getChildren() throws IOException 
    Get the children
 public List<VirtualFile> getChildren(VirtualFileFilter filter) throws IOException 
    Get the children
 public List<VirtualFile> getChildrenRecursively() throws IOException 
 public List<VirtualFile> getChildrenRecursively(VirtualFileFilter filter) throws IOException 
 VirtualFileHandler getHandler() 
    Get the virtual file handler
 public long getLastModified() throws IOException 
    When the file was last modified
 public String getName() 
    Get the simple VF name (X.java)
 public VirtualFile getParent() throws IOException 
    Get the parent
 public String getPathName() 
    Get the VFS relative path name (org/jboss/X.java)
 public long getSize() throws IOException 
    Get the size
 public VFS getVFS() 
    Get the VFS instance for this virtual file
 public boolean hasBeenModified() throws IOException 
    Returns true if the file has been modified since this method was last called Last modified time is initialized at handler instantiation.
 public int hashCode() 
 public boolean isArchive() throws IOException 
    Is the file archive.
 public boolean isHidden() throws IOException 
    Whether it is hidden
 public boolean isLeaf() throws IOException 
    Whether it is a simple leaf of the VFS, i.e. whether it can contain other files
 public InputStream openStream() throws IOException 
    Access the file contents.
 public String toString() 
 public URI toURI() throws MalformedURLException, URISyntaxException 
    Get the VF URI (file://root/org/jboss/X.java)
 public URL toURL() throws MalformedURLException, URISyntaxException 
    Get the VF URL (file://root/org/jboss/X.java)
 public  void visit(VirtualFileVisitor visitor) throws IOException 
    Visit the virtual file system