org.entityfs.support.io
Interface RandomAccessFileFactory

All Known Implementing Classes:
LockAwareRandomAccessFileFactoryImpl, RandomAccessFileFactoryImpl

public interface RandomAccessFileFactory

This interface defines an interface for creating RandomAccessFile:s. It is used to open files with certain properties without having to make the code opening the stream take care of that.

A factory instance should only be used once and then discarded.

Since:
1.0
Author:
Karl Gustafsson

Method Summary
 RandomAccessFile createRandomAccessFile(File file, RandomAccessMode mode)
          Create a RandomAccessFile on the file.
 

Method Detail

createRandomAccessFile

RandomAccessFile createRandomAccessFile(File file,
                                        RandomAccessMode mode)
                                        throws FileNotFoundException
Create a RandomAccessFile on the file.

Parameters:
file - The file to open.
mode - The file mode.
Returns:
A RandomAccessFile.
Throws:
FileNotFoundException - If the file is not found.