public class RamFileSystem extends AbstractFileSystem implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
private static int |
BUFFER_SIZE |
private java.util.Map<FileName,RamFileData> |
cache
Cache of RAM File Data
|
private static long |
serialVersionUID
serialVersionUID format is YYYYMMDD for the date of the last binary change.
|
| Modifier | Constructor and Description |
|---|---|
protected |
RamFileSystem(FileName rootName,
FileSystemOptions fileSystemOptions) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCapabilities(java.util.Collection<Capability> caps)
Adds the capabilities of this file system.
|
void |
attach(RamFileObject fo) |
void |
close()
Close the RAMFileSystem.
|
protected FileObject |
createFile(AbstractFileName name)
Creates a file object.
|
(package private) void |
delete(RamFileObject file)
Delete a file
|
void |
importTree(java.io.File file)
Import a Tree.
|
(package private) java.lang.String[] |
listChildren(FileName name) |
(package private) void |
rename(RamFileObject from,
RamFileObject to) |
(package private) void |
save(RamFileObject file)
Saves a file
|
(package private) long |
size() |
(package private) void |
toRamFileObject(FileObject fo,
FileObject root)
Import the given file with the name relative to the given root
|
addJunction, addListener, closeCommunicationLink, decorateFileObject, doCloseCommunicationLink, doReplicateFile, fireFileChanged, fireFileCreated, fireFileDeleted, getAttribute, getFileFromCache, getFileSystemManager, getFileSystemOptions, getLastModTimeAccuracy, getParentLayer, getRoot, getRootName, getRootURI, hasCapability, init, isOpen, isReleaseable, notifyAllStreamsClosed, putFileToCache, removeFileFromCache, removeJunction, removeListener, replicateFile, resolveFile, resolveFile, setAttributegetContext, getLogger, setContext, setLoggerprivate static final int BUFFER_SIZE
private static final long serialVersionUID
private final java.util.Map<FileName,RamFileData> cache
protected RamFileSystem(FileName rootName, FileSystemOptions fileSystemOptions)
rootName - The root file name.fileSystemOptions - The FileSystem options.protected FileObject createFile(AbstractFileName name) throws java.lang.Exception
AbstractFileSystemThis method is called only if the requested file is not cached.
createFile in class AbstractFileSystemname - name referencing the new file.java.lang.Exception - might throw an Exception, which is then wrapped in FileSystemException.protected void addCapabilities(java.util.Collection<Capability> caps)
AbstractFileSystemaddCapabilities in class AbstractFileSystemcaps - collections of Capabilities, can be immutable.java.lang.String[] listChildren(FileName name)
name - The name of the file.void delete(RamFileObject file) throws FileSystemException
file - FileSystemExceptionvoid save(RamFileObject file) throws FileSystemException
file - FileSystemExceptionvoid rename(RamFileObject from, RamFileObject to) throws FileSystemException
from - The original file.to - The new file.FileSystemException - if an error occurs.public void attach(RamFileObject fo)
public void importTree(java.io.File file)
throws FileSystemException
file - The FileFileSystemException - if an error occurs.void toRamFileObject(FileObject fo, FileObject root) throws FileSystemException
fo - root - FileSystemExceptionlong size()
public void close()
close in interface VfsComponentclose in class AbstractFileSystem