Class DirRandomAccessFile

java.lang.Object
java.io.RandomAccessFile
org.apache.derby.impl.io.DirRandomAccessFile
All Implemented Interfaces:
Closeable, DataInput, DataOutput, AutoCloseable, StorageRandomAccessFile

class DirRandomAccessFile extends RandomAccessFile implements StorageRandomAccessFile
This class provides a disk based implementation of the StIRandomAccess File interface. It is used by the database engine to access persistent data and transaction logs under the directory (default) subsubprotocol.
  • Field Details

    • _name

      private final File _name
    • _mode

      private final String _mode
  • Constructor Details

    • DirRandomAccessFile

      DirRandomAccessFile(File name, String mode) throws FileNotFoundException
      Construct a StorageRandomAccessFileImpl.
      Parameters:
      name - The file name.
      mode - The file open mode: "r", "rw", "rws", or "rwd". The "rws" and "rwd" modes specify that the file is to be synchronized, consistent with the java.io.RandomAccessFile class. However the StorageRandomAccessFile.sync() method will be called even if the file was opened in "rws" or "rwd" mode. If the "rws" or "rwd" modes are supported then the implementation of StorageRandomAccessFile.sync need not do anything.
      Throws:
      IllegalArgumentException - if the mode argument is not equal to one of "r", "rw".
      FileNotFoundException - if the file exists but is a directory rather than a regular file, or cannot be opened or created for any other reason .
  • Method Details