Package PamController
Class PSFXReadWriter
java.lang.Object
PamController.PSFXReadWriter
Read and write psfx type configuration files.
- Author:
- dg50
-
Method Summary
Modifier and TypeMethodDescriptionstatic PSFXReadWriter
loadFileSettings
(File file) selectSettingsFile
(Window frame, boolean toRead) Select a psfx file.boolean
Save settings to psfx file.boolean
Write the settings to the file
Initially write to a temp file, then rename the temp file.boolean
writePSFX
(String fileName, PamSettingsGroup psg) Write settings to the given file
Initially write to a temp file, then rename the temp file.
-
Method Details
-
getInstance
-
writePSFX
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
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:
- true on success
-
writePSFX
Write settings to the given 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)psg
- PAMGuard settings group- Returns:
- true on success
-
selectSettingsFile
Select a psfx file.- Parameters:
toRead
- if true, only selects existing files with the open dialog.- Returns:
- File or null.
-
loadFileSettings
-