com.sentilla.system
Class FileDriver

java.lang.Object
  extended by com.sentilla.system.DriverAdapter
      extended by com.sentilla.system.FileDriver
All Implemented Interfaces:
Driver

public abstract class FileDriver
extends DriverAdapter

Provides open, create, and remove operations for files. The file system uses integers for filenames and returns RandomAccessFile interfaces for data access. "file" is used as the default driver name.


Field Summary
 
Fields inherited from class com.sentilla.system.DriverAdapter
m_nextDriver
 
Constructor Summary
FileDriver()
           
 
Method Summary
static RandomAccessFile create(int filename)
          Create a new file.
abstract  RandomAccessFile createFile(int filename)
          Create a new file.
static RandomAccessFile open(int filename)
          Open an existing file.
abstract  RandomAccessFile openFile(int filename)
          Open an existing file.
static void remove(int filename)
          Remove a file.
abstract  void removeFile(int filename)
          Remove a file.
 
Methods inherited from class com.sentilla.system.DriverAdapter
getDriverName, getNextDriver, setNextDriver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileDriver

public FileDriver()
Method Detail

openFile

public abstract RandomAccessFile openFile(int filename)
Open an existing file.

Parameters:
filename - the 32-bit filename to open
Returns:
a new RandomAccessFile
Throws:
IORuntimeException - if the file does not exist

createFile

public abstract RandomAccessFile createFile(int filename)
Create a new file.

Parameters:
filename - the 32-bit filename to create
Returns:
a new RandomAccessFile
Throws:
IORuntimeException - if the file cannot be created

removeFile

public abstract void removeFile(int filename)
Remove a file.

Parameters:
filename - the 32-bit filename to remove
Throws:
IORuntimeException - if the file cannot be removed

open

public static RandomAccessFile open(int filename)
Open an existing file.

The "file" system driver is used.

Parameters:
filename - the 32-bit filename to open
Returns:
a new RandomAccessFile
Throws:
IORuntimeException - if the file does not exist

create

public static RandomAccessFile create(int filename)
Create a new file.

The "file" system driver is used.

Parameters:
filename - the 32-bit filename to create
Returns:
a new RandomAccessFile
Throws:
IORuntimeException - if the file cannot be created

remove

public static void remove(int filename)
Remove a file.

The "file" system driver is used.

Parameters:
filename - the 32-bit filename to remove
Throws:
IORuntimeException - if the file cannot be removed


Copyright © 2007 Sentilla Corporation. All Rights Reserved.