org.entityfs.util.io
Class LockAwareRandomAccessFileFactoryImpl
java.lang.Object
org.entityfs.util.io.LockAwareRandomAccessFileFactoryImpl
- All Implemented Interfaces:
- RandomAccessFileFactory
public class LockAwareRandomAccessFileFactoryImpl
- extends Object
- implements RandomAccessFileFactory
A RandomAccessFileFactory
that creates
LockAwareRandomAccessFile
:s.
Instances of this class should only be used once.
- Since:
- 1.0
- Author:
- Karl Gustafsson
- See Also:
LockAwareFileInputStream
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LockAwareRandomAccessFileFactoryImpl
public LockAwareRandomAccessFileFactoryImpl(EntityLock lock)
createRandomAccessFile
public RandomAccessFile createRandomAccessFile(File f,
RandomAccessMode mode)
throws FileNotFoundException
- Does not unlock the lock in case of errors.
- Specified by:
createRandomAccessFile
in interface RandomAccessFileFactory
- Parameters:
f
- The file to open.mode
- The file mode.
- Returns:
- A
RandomAccessFile
.
- Throws:
FileNotFoundException
- If the file is not found.