org.entityfs.support.io
Class RandomAccessFileFactoryImpl

java.lang.Object
  extended by org.entityfs.support.io.RandomAccessFileFactoryImpl
All Implemented Interfaces:
RandomAccessFileFactory

public class RandomAccessFileFactoryImpl
extends Object
implements RandomAccessFileFactory

Standard implementation of RandomAccessFileFactory that creates plain RandomAccessFile objects.

An instance of this class does not contain any mutable internal state. Use the singleton instance (INSTANCE). The constructor is declared private.

Since:
1.0
Author:
Karl Gustafsson
In_jar:
entityfs-core

Field Summary
static RandomAccessFileFactoryImpl INSTANCE
          Singleton instance.
 
Method Summary
 RandomAccessFile createRandomAccessFile(File f, RandomAccessMode mode)
          Create a RandomAccessFile on the file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final RandomAccessFileFactoryImpl INSTANCE
Singleton instance.

Method Detail

createRandomAccessFile

public RandomAccessFile createRandomAccessFile(File f,
                                               RandomAccessMode mode)
                                        throws FileNotFoundException
Description copied from interface: RandomAccessFileFactory
Create a RandomAccessFile on the file.

Specified by:
createRandomAccessFile in interface RandomAccessFileFactory
Parameters:
f - The file to open.
mode - The file mode.
Returns:
A RandomAccessFile object.
Throws:
FileNotFoundException - If the file is not found.