org.h2.store.fs
Class FileSystemDiskNio

java.lang.Object
  extended by org.h2.store.fs.FileSystem
      extended by org.h2.store.fs.FileSystemWrapper
          extended by org.h2.store.fs.FileSystemDiskNio
Direct Known Subclasses:
FileSystemDiskNioMapped

public class FileSystemDiskNio
extends FileSystemWrapper

This file system stores files on disk and uses java.nio to access the files. This class uses FileChannel.


Constructor Summary
FileSystemDiskNio()
           
 
Method Summary
protected  java.lang.String getPrefix()
          Get the prefix for this file system.
protected  FileObject open(java.lang.String fileName, java.lang.String mode)
          Try to open a file with this name and mode.
 FileObject openFileObject(java.lang.String fileName, java.lang.String mode)
          Open a random access file object.
 
Methods inherited from class org.h2.store.fs.FileSystemWrapper
accepts, canWrite, copy, createDirs, createNewFile, createTempFile, delete, deleteRecursive, exists, fileStartsWith, getCanonicalPath, getFileName, getLastModified, getParent, isAbsolute, isDirectory, isReadOnly, length, listFiles, openFileInputStream, openFileOutputStream, rename, setReadOnly, tryDelete, unwrap
 
Methods inherited from class org.h2.store.fs.FileSystem
getInstance, getNextTempFileNamePart, mkdirs, register, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSystemDiskNio

public FileSystemDiskNio()
Method Detail

openFileObject

public FileObject openFileObject(java.lang.String fileName,
                                 java.lang.String mode)
                          throws java.io.IOException
Description copied from class: FileSystem
Open a random access file object.

Overrides:
openFileObject in class FileSystemWrapper
Parameters:
fileName - the file name
mode - the access mode. Supported are r, rw, rws, rwd
Returns:
the file object
Throws:
java.io.IOException

getPrefix

protected java.lang.String getPrefix()
Get the prefix for this file system.

Specified by:
getPrefix in class FileSystemWrapper
Returns:
the prefix

open

protected FileObject open(java.lang.String fileName,
                          java.lang.String mode)
                   throws java.io.IOException
Try to open a file with this name and mode.

Parameters:
fileName - the file name
mode - the open mode
Returns:
the file object
Throws:
java.io.IOException - if opening fails