Class VirtualFileAssembly
java.lang.Object
org.jboss.vfs.VirtualFileAssembly
- All Implemented Interfaces:
Closeable, AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classNode located within the assembly.private static classPath representation to hold onto the elements of the path. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final VirtualFileprivate static final Randomprivate final VirtualFileAssembly.AssemblyNodeprivate TempFileProvider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidadd(String path, VirtualFile virtualFile) Add aVirtualFileto the assembly in a given path.voidadd(VirtualFile virtualFile) Add aVirtualFileto the assembly.voidvoidclose()Close the assembly and nested resources.booleancontains(VirtualFile mountPoint, VirtualFile target) private StringgetChildNames(VirtualFile mountPoint, VirtualFile target) Returns a list of all the names of the children in the assembly.getFile(VirtualFile mountPoint, VirtualFile target) Get the VirtualFile from the assembly.private TempFileProvider
-
Field Details
-
RANDOM_NUM_GEN
-
rootNode
-
mountHandles
-
mountRoot
-
tempFileProvider
-
-
Constructor Details
-
VirtualFileAssembly
public VirtualFileAssembly()
-
-
Method Details
-
add
Add aVirtualFileto the assembly.- Parameters:
virtualFile-
-
add
Add aVirtualFileto the assembly in a given path.- Parameters:
path-virtualFile-
-
add
- Throws:
IOException
-
addZip
- Throws:
IOException
-
getFile
Get the VirtualFile from the assembly. This will traverse VirtualFiles in assembly to find children if needed.- Parameters:
mountPoint-target-- Returns:
- Throws:
IOException
-
getChildNames
Returns a list of all the names of the children in the assembly.- Returns:
-
contains
-
close
public void close()Close the assembly and nested resources.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
getTempFileProvider
- Returns:
- Throws:
IOException
-
getAssemblyId
-