net.aerith.misao.io
Class MemoryFileSystem
java.lang.Object
|
+--net.aerith.misao.io.MemoryFileSystem
- public class MemoryFileSystem
- extends java.lang.Object
- implements FileSystem
The MemoryFileSystem
represents a virtual file system
on memory.
Field Summary |
protected java.util.Hashtable |
hash_objects
The hash table for objects. |
protected java.util.Hashtable |
hash_root
The root hash table. |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
hash_root
protected java.util.Hashtable hash_root
- The root hash table.
hash_objects
protected java.util.Hashtable hash_objects
- The hash table for objects.
MemoryFileSystem
public MemoryFileSystem()
- Constructs a
MemoryFileSystem
.
getFolder
public Folder getFolder(java.lang.String name)
- Gets the top folder.
- Specified by:
- getFolder in interface FileSystem
- Parameters:
name
- the folder name.- Returns:
- the folder.
getHierarchicalFolder
public Folder getHierarchicalFolder(java.util.Vector folder_list)
- Gets the folder represented by the specified hierarchy.
- Specified by:
- getHierarchicalFolder in interface FileSystem
- Parameters:
folder_list
- the list of hierarchical folders.- Returns:
- the terminal folder.
createHierarchicalFolder
public Folder createHierarchicalFolder(java.util.Vector folder_list)
throws java.io.IOException
- Creates the folder hierarchy and returns the folder.
- Specified by:
- createHierarchicalFolder in interface FileSystem
- Parameters:
folder_list
- the list of hierarchical folders.- Returns:
- the terminal folder.
- Throws:
- java.io.IOException - if I/O error occurs.
getPrimitiveManager
public PrimitiveManager getPrimitiveManager(Folder folder,
XmlDBHolder holder_class,
XmlDBRecord record_class)
throws java.io.IOException
- Gets the new
PrimitiveManager
of the specified
folder.
- Specified by:
- getPrimitiveManager in interface FileSystem
- Parameters:
folder
- the folder.holder_class
- the holder class object of the XML records.record_class
- the class object of the XML records.- Throws:
- java.io.IOException - if I/O error occurs.
discard
public void discard()
throws java.io.IOException
- Discards the file system. All files and directories in the file
system removed.
- Specified by:
- discard in interface FileSystem
- Throws:
- java.io.IOException - if I/O error occurs.