Package PamController

Class PSFXReadWriter

java.lang.Object
PamController.PSFXReadWriter

public class PSFXReadWriter extends Object
Read and write psfx type configuration files.
Author:
dg50
  • Method Details

    • getInstance

      public static PSFXReadWriter getInstance()
    • writePSFX

      public boolean writePSFX(String fileName)
      Save settings to psfx file. Note that this method first saves to a temp file (using the filename passed with 'tmp' appended to the end) and then renames to the correct filename at the end. This way, if something happens and the file becomes corrupted during the save, the original will still be safe
      Parameters:
      fileName - the name to use for the save file (full name, including path)
      Returns:
      true if successful, false otherwise
    • writePSFX

      public boolean writePSFX(String fileName, long timeStamp)
      Write the settings to the file
      Initially write to a temp file, then rename the temp file.
      Parameters:
      fileName - the name to use for the save file (full name, including path)
      timeStamp - time stamp in milliseconds
      Returns:
    • loadFileSettings

      public PamSettingsGroup loadFileSettings(File file)