Hi K. Tsang,
Actually, I found out why I couldn't persist the file on disk : I wasn't using the right constructor. RandomAccessFile provides two constructors and I was using the wrong one :
public RandomAccessFile(File file,
String mode) throws FileNotFoundException is the one I should have used to persist a file on disk. It creates a random access file stream to read from, and optionally to write to, the file specified by the File argument
Instead I was using :
RandomAccessFile(String name, String mode) which creates a random access file stream to read from, and optionally to write to, a file with the specified name. This constructor implies that the file -which string name is passed as a parameter- already exists.
Sincerely,
Maurice