JBoss VFS 3.0.1.GA

org.jboss.vfs
Class VirtualFileAssembly

java.lang.Object
  extended by org.jboss.vfs.VirtualFileAssembly
All Implemented Interfaces:
Closeable

public class VirtualFileAssembly
extends Object
implements Closeable

Assembly of VirtualFiles that can be mounted into the VFS in a structure that is not required to match a real filesystem structure.

Author:
John Bailey

Constructor Summary
VirtualFileAssembly()
           
 
Method Summary
 void add(String path, File root)
           
 void add(String path, VirtualFile virtualFile)
          Add a VirtualFile to the assembly in a given path.
 void add(VirtualFile virtualFile)
          Add a VirtualFile to the assembly.
 void addZip(String path, File zipFile)
           
 void close()
          Close the assembly and nested resources.
 boolean contains(VirtualFile mountPoint, VirtualFile target)
           
 List<String> getChildNames(VirtualFile mountPoint, VirtualFile target)
          Returns a list of all the names of the children in the assembly.
 VirtualFile getFile(VirtualFile mountPoint, VirtualFile target)
          Get the VirtualFile from the assembly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VirtualFileAssembly

public VirtualFileAssembly()
Method Detail

add

public void add(VirtualFile virtualFile)
Add a VirtualFile to the assembly.

Parameters:
virtualFile -

add

public void add(String path,
                VirtualFile virtualFile)
Add a VirtualFile to the assembly in a given path.

Parameters:
path -
virtualFile -

add

public void add(String path,
                File root)
         throws IOException
Throws:
IOException

addZip

public void addZip(String path,
                   File zipFile)
            throws IOException
Throws:
IOException

getFile

public VirtualFile getFile(VirtualFile mountPoint,
                           VirtualFile target)
Get the VirtualFile from the assembly. This will traverse VirtualFiles in assembly to find children if needed.

Parameters:
mountPoint -
target -
Returns:
Throws:
IOException

getChildNames

public List<String> getChildNames(VirtualFile mountPoint,
                                  VirtualFile target)
Returns a list of all the names of the children in the assembly.

Returns:

contains

public boolean contains(VirtualFile mountPoint,
                        VirtualFile target)

close

public void close()
Close the assembly and nested resources.

Specified by:
close in interface Closeable

JBoss VFS 3.0.1.GA

Copyright © 2011 JBoss, A division of Red Hat, Inc. All Rights Reserved.